Analytic Geometry of $\mathbb{S}^3$ Hopf Fibration¶

$\textbf{A replica of SageManifolds notebook tutorial with revisions, extractions, and an appendix on software architecture added.}$ $\textit{Disclaimer: Manuscript may be prone to errors; point them out, comment where posted and will be corrected in an errata.}$

Vol. 1, ID: 003
November 16, 2023

Hopf Fibration icon

Background and Prerequisites¶

  • Subject: Manifolds, Charts, Quaternions, Hopf Fibration
  • Applications:
        (i) Qubits - Two level quantum systems (White paper example), (ii) Mechanics - Harmonic oscillators,
        (iii) General Relativity, (iv) Twister theory, (v) Magnetic 🧲 Monopoles, (vi) Gauge symmetry, (vii) Dirac equation
  • Software Package: SageManifolds
  • Programming Language: Python
  • Download and Installation instructions (Section 1 of link)

Section 1. $\mathbb{S}^3$ Differentiable Manifold: Charts and Coordinates¶

Hopf fibration is a mathematical concept that describes the mapping of a 3-sphere onto a complex projective space, revealing intricate connections between topology, geometry, and algebraic structures. The complex projective space, denoted as $\mathbb{CP}^1$ is the space of all complex lines passing through the origin in $\mathbb{C}^2$ and topologically equivalent to the 2-sphere, $\mathbb{S}^2$. Hence, Hopf fibration entails a mapping from an $\mathbb{S}^3$ manifold to an $\mathbb{S}^2$ manifold.

We'll first define the $\mathbb{S}^3$ manifold with its appropriate charts, transition mappings, and coordinates. Later, we'll do the same for the $\mathbb{S}^2$ manifold, and define the Hopf map between the $\mathbb{S}^3$ manifold and the $\mathbb{S}^2$ manifold. Below, we instantiate the 3-sphere differentiable manifold over $\mathbb{R}$ with $\verb|Manifold()|$:

In [2]:
S3 = Manifold(3, 'S^3', latex_name=r'\mathbb{S}^3', start_index=1)
  • $\verb|3|$ – integer; dimension of the manifold
  • $\verb|'S^3'|$ – string; name (symbol) given to the manifold
  • $\verb|r'\mathbb{S}^3'|$ – string; LaTeX symbol to denote the manifold
  • $\verb|1|$ – integer; lower value of the range of indices used for “indexed objects” on the manifold, e.g. coordinates in a chart

Optional arguments also include [1]:

  • $\verb|field|$ – (default: 'real') field $\textit{K}$ on which the manifold is defined
  • $\verb|structure|$ – (default: 'smooth') structure\type of manifold

Returns:

  • manifold of specified $\verb|structure|$ type, as an instance of $\verb|TopologicalManifold|$ or one of its subclasses $\verb|DifferentiableManifold|$ or $\verb|PseudoRiemannianManifold|$
In [3]:
print(S3)
3-dimensional differentiable manifold S^3

Conventionally, $\mathbb{S}^3$ will require two open charts to cover it: one is the stereographic chart from the North pole, and the other is a stereographic chart from the South pole. We define the open subsets of $\mathbb{S}^3$ covered by the two charts as:

\begin{equation*} \begin{split} U := \mathbb{S}^3 \; / \; \{N\} \\ V := \mathbb{S}^3 \; / \; \{S\}, \end{split} \end{equation*}

where $N$ is the North pole, $S$ is the South pole, and

\begin{equation*} \mathbb{S}^3 = U \cup V \end{equation*}
In [4]:
U = S3.open_subset('U')
print(U)
Open subset U of the 3-dimensional differentiable manifold S^3
In [5]:
V = S3.open_subset('V')
print(V)
Open subset V of the 3-dimensional differentiable manifold S^3
In [6]:
S3.declare_union(U, V)

Hence, the associated chart/coordinate, given $\verb|U|$, is the stereographic projected coordinate $\verb|<x,y,z>|$ from the North pole of $\mathbb{S}^3$ onto the respective equatorial plane:

In [7]:
stereoN.<x,y,z> = U.chart()
stereoN
Out[7]:
\(\displaystyle \left(U,(x, y, z)\right)\)
In [8]:
stereoN.coord_range()
Out[8]:
\(\displaystyle x :\ \left( -\infty, +\infty \right) ;\quad y :\ \left( -\infty, +\infty \right) ;\quad z :\ \left( -\infty, +\infty \right)\)

And the associated chart/coordinate, given $\verb|V|$, is the stereographic projected coordinate $\verb|<xp,yp,zp>|$ from the South pole of $\mathbb{S}^3$ onto the respective equatorial plane:

In [9]:
stereoS.<xp,yp,zp> = V.chart("xp:x' yp:y' zp:z'")
stereoS
Out[9]:
\(\displaystyle \left(V,({x'}, {y'}, {z'})\right)\)
In [10]:
stereoS.coord_range()
Out[10]:
\(\displaystyle {x'} :\ \left( -\infty, +\infty \right) ;\quad {y'} :\ \left( -\infty, +\infty \right) ;\quad {z'} :\ \left( -\infty, +\infty \right)\)

Given the defined charts $\verb|stereoN|$ and $\verb|stereoS|$, a transition map from $\verb|stereoN|$ to $\verb|stereoS|$ is required. This is to be defined through the $\verb|transition_map()|$ function of $\verb|stereoN|$, followed by the inverse mapping with $\verb|inverse()|$ on the respective transition map object for the transition map from $\verb|stereoS|$ to $\verb|stereoN|$ (as shown here on 3-sphere stereographic coordinates Wikipedia page):

In [11]:
r2 = x^2+y^2+z^2
stereoN_to_S = stereoN.transition_map(stereoS, 
                                      (x/r2, y/r2, z/r2), 
                                      intersection_name='W',
                                      restrictions1= x^2+y^2+z^2!=0, 
                                      restrictions2= xp^2+yp^2+zp^2!=0)
stereoN_to_S.display()
Out[11]:
\(\displaystyle \left\{\begin{array}{lcl} {x'} & = & \frac{x}{x^{2} + y^{2} + z^{2}} \\ {y'} & = & \frac{y}{x^{2} + y^{2} + z^{2}} \\ {z'} & = & \frac{z}{x^{2} + y^{2} + z^{2}} \end{array}\right.\)
In [12]:
stereoS_to_N = stereoN_to_S.inverse()
stereoS_to_N.display()
Out[12]:
\(\displaystyle \left\{\begin{array}{lcl} x & = & \frac{{x'}}{{x'}^{2} + {y'}^{2} + {z'}^{2}} \\ y & = & \frac{{y'}}{{x'}^{2} + {y'}^{2} + {z'}^{2}} \\ z & = & \frac{{z'}}{{x'}^{2} + {y'}^{2} + {z'}^{2}} \end{array}\right.\)

Now the atlas of charts defined for $\verb|S3|$ so far are retrieved with $\verb|atlas()|$ method as:

In [13]:
S3.atlas()
Out[13]:
\(\displaystyle \left[\left(U,(x, y, z)\right), \left(V,({x'}, {y'}, {z'})\right), \left(W,(x, y, z)\right), \left(W,({x'}, {y'}, {z'})\right)\right]\)

For further analysis, we create a Python variable for the intersection of open subsets $\verb|U|$ and $\verb|V|$:

In [14]:
W = U.intersection(V)
print(W)
Open subset W of the 3-dimensional differentiable manifold S^3

Furthermore, we define the North and South pole of $\mathbb{S}^3$ for further study and examination. Thus, the North pole of $\mathbb{S}^3$ is a point at the origin of $\verb|V|$'s chart $\verb|stereoS|$:

In [15]:
N = V((0,0,0), chart=stereoS, name='N')
print(N)
Point N on the 3-dimensional differentiable manifold S^3

And the South pole of $\mathbb{S}^3$ is a point at the origin of $\verb|U|$'s chart $\verb|stereoN|$:

In [16]:
S = U((0,0,0), chart=stereoN, name='S')
print(S)
Point S on the 3-dimensional differentiable manifold S^3

Section 2. $\mathbb{S}^3$ Embedding into $\mathbb{R}^4$¶

Now, given that $\mathbb{S}^3 \subset \mathbb{R}^4$, we'll need to define the embedding of $\mathbb{S}^3$ into $\mathbb{R}^4$ via smoothly mapping the $\mathbb{S}^3$ stereographic coordinates to $\mathbb{R}^4$. First, lets define the $\mathbb{R}^4$ manifold, chart, and four-dimensional coordinate:

In [17]:
R4 = Manifold(4, 'R^4', r'\mathbb{R}^4')
X4.<T,X,Y,Z> = R4.chart()
X4
Out[17]:
\(\displaystyle \left(\mathbb{R}^4,(T, X, Y, Z)\right)\)

Next, we define the smooth map from $\mathbb{S}^3$ to $\mathbb{R}^4$, which is a stereographic projection from the North pole, $(−1,0,0,0)$, to the equatorial plane $T = 0$, via $\verb|diff_map()|$ of $\verb|S3|$ manifold object (as shown here on 3-sphere stereographic coordinates Wikipedia page):

In [18]:
rp2 = xp^2 + yp^2 + zp^2
Phi = S3.diff_map(R4, {(stereoN, X4): 
                       [(1-r2)/(r2+1), 2*x/(r2+1), 
                        2*y/(r2+1), 2*z/(r2+1)],
                       (stereoS, X4):
                       [(rp2-1)/(rp2+1), 2*xp/(rp2+1), 
                        2*yp/(rp2+1), 2*zp/(rp2+1)]},
                  name='Phi', latex_name=r'\Phi')
Phi.display()
Out[18]:
\(\displaystyle \begin{array}{llcl} \Phi:& \mathbb{S}^3 & \longrightarrow & \mathbb{R}^4 \\ \text{on}\ U : & \left(x, y, z\right) & \longmapsto & \left(T, X, Y, Z\right) = \left(-\frac{x^{2} + y^{2} + z^{2} - 1}{x^{2} + y^{2} + z^{2} + 1}, \frac{2 \, x}{x^{2} + y^{2} + z^{2} + 1}, \frac{2 \, y}{x^{2} + y^{2} + z^{2} + 1}, \frac{2 \, z}{x^{2} + y^{2} + z^{2} + 1}\right) \\ \text{on}\ V : & \left({x'}, {y'}, {z'}\right) & \longmapsto & \left(T, X, Y, Z\right) = \left(\frac{{x'}^{2} + {y'}^{2} + {z'}^{2} - 1}{{x'}^{2} + {y'}^{2} + {z'}^{2} + 1}, \frac{2 \, {x'}}{{x'}^{2} + {y'}^{2} + {z'}^{2} + 1}, \frac{2 \, {y'}}{{x'}^{2} + {y'}^{2} + {z'}^{2} + 1}, \frac{2 \, {z'}}{{x'}^{2} + {y'}^{2} + {z'}^{2} + 1}\right) \end{array}\)

Thus, $\verb|diff_map()|$ should output the expected coordinate for the North pole from $\mathbb{S}^3$ to $\mathbb{R}^4$:

In [19]:
X4(Phi(N))
Out[19]:
\(\displaystyle \left(-1, 0, 0, 0\right)\)

And it should do the same for the South pole from $\mathbb{S}^3$ from $\mathbb{R}^4$:

In [20]:
X4(Phi(S))
Out[20]:
\(\displaystyle \left(1, 0, 0, 0\right)\)

Now, lets get a sense of the embedding map through plotting the $\verb|Phi|$ embedding of points in $\mathbb{S}^3$ into $\verb|X4| \in \mathbb{R}^4$ using the $\verb|plot()|$ function of one of the $\verb|S3|$ chart domains, $\verb|stereoN|$:

In [21]:
graph_stereoN = stereoN.plot(chart=X4, mapping=Phi, 
                             ambient_coords=(X,Y,Z),
                             number_values=9,
                             color={x: 'red', y: 'green', z: 'gold'},
                             label_axes=False)
show(graph_stereoN, axes_labels=['X', 'Y', 'Z'])

We'll also plot the North and South pole, $(-1,0,0,0)$ and $(1,0,0,0)$, respectively:

In [22]:
graph_stereoN = stereoN.plot(chart=X4, mapping=Phi, 
                             ambient_coords=(X,Y,T),
                             number_values=13, plot_points=150,
                             color={x: 'red', y: 'green', z: 'gold'},
                             label_axes=False)
pointN = N.plot(chart=X4, mapping=Phi, ambient_coords=(X,Y,T), 
                color='maroon', label_offset=0.05)
pointS = S.plot(chart=X4, mapping=Phi, ambient_coords=(X,Y,T), 
                color='maroon', label_offset=0.05)
show(graph_stereoN + pointN + pointS, axes_labels=['X', 'Y', 'T'])

Now a generalized spherical coordinate for $\mathbb{S}^3$ may be prescribed (as shown here on 3-sphere hyperspherical coordinates Wikipedia page). It's the $\textbf{hyperspherical coordinate}$, which is the open subset $A \subset W \subset \mathbb{S}^3$, restricted to the complement of the prime meridian of $\mathbb{S}^3$. The prime meridian of $\mathbb{S}^3$ occurs at $y=0$ and $x \ge 0$:

In [23]:
A = W.open_subset('A', coord_def={stereoN.restrict(W): (y!=0, x<0), 
                                  stereoS.restrict(W): (yp!=0, xp<0)})
print(A)
Open subset A of the 3-dimensional differentiable manifold S^3

The hyperspherical coordinate, $(\chi, \theta, \phi)$ and its range may be prescribed with $\verb|chart()|$ of the respective open subset $\verb|A|$:

In [24]:
spher.<ch,th,ph> = A.chart(r'ch:(0,pi):\chi th:(0,pi):\theta ph:(0,2*pi):\phi')
spher
Out[24]:
\(\displaystyle \left(A,({\chi}, {\theta}, {\phi})\right)\)
In [25]:
spher.coord_range()
Out[25]:
\(\displaystyle {\chi} :\ \left( 0 , \pi \right) ;\quad {\theta} :\ \left( 0 , \pi \right) ;\quad {\phi} :\ \left( 0 , 2 \, \pi \right)\)

A transition map from the hyperspherical coordinate to the $\mathbb{S}^3$ stereographic chart, $(A, (x, y, z))$, is prescribed. This may be implemented via $\verb|transition_map()|$ of hyperspherical chart $\verb|spher|$:

In [26]:
den = 1 + cos(ch)
spher_to_stereoN = spher.transition_map(stereoN.restrict(A), 
                                        (sin(ch)*sin(th)*cos(ph)/den,
                                         sin(ch)*sin(th)*sin(ph)/den,
                                         sin(ch)*cos(th)/den))
spher_to_stereoN.display()
Out[26]:
\(\displaystyle \left\{\begin{array}{lcl} x & = & \frac{\cos\left({\phi}\right) \sin\left({\chi}\right) \sin\left({\theta}\right)}{\cos\left({\chi}\right) + 1} \\ y & = & \frac{\sin\left({\chi}\right) \sin\left({\phi}\right) \sin\left({\theta}\right)}{\cos\left({\chi}\right) + 1} \\ z & = & \frac{\cos\left({\theta}\right) \sin\left({\chi}\right)}{\cos\left({\chi}\right) + 1} \end{array}\right.\)

The inverse map (as shown here on N-sphere spherical coordinates Wikipedia page) is as prescribed below, via the $\verb|set_inverse()|$ function of the transition map object, $\verb|spher_to_stereoN|$:

In [27]:
spher_to_stereoN.set_inverse(2*atan(sqrt(x^2+y^2+z^2)),
                             atan2(sqrt(x^2+y^2), z),
                             atan2(-y, -x) + pi)
Check of the inverse coordinate transformation:
  ch == 2*arctan(sqrt(-cos(ch) + 1)/sqrt(cos(ch) + 1))  **failed**
  th == arctan2(sqrt(-cos(ch) + 1)*sin(th)/sqrt(cos(ch) + 1), cos(th)*sin(ch)/(cos(ch) + 1))  **failed**
  ph == pi - arctan2(sin(ch)*sin(ph)*sin(th)/(cos(ch) + 1), -cos(ph)*sin(ch)*sin(th)/(cos(ch) + 1))  **failed**
  x == x  *passed*
  y == y  *passed*
  z == z  *passed*
NB: a failed report can reflect a mere lack of simplification.

The first three failures above is due to lack of simplification

In [28]:
spher_to_stereoN.inverse().display()
Out[28]:
\(\displaystyle \left\{\begin{array}{lcl} {\chi} & = & 2 \, \arctan\left(\sqrt{x^{2} + y^{2} + z^{2}}\right) \\ {\theta} & = & \arctan\left(\sqrt{x^{2} + y^{2}}, z\right) \\ {\phi} & = & \pi + \arctan\left(-y, -x\right) \end{array}\right.\)

The transition map from $(A, (\chi,\theta,\phi))$ to $(A, (x', y', z'))$ is to be done via $(A, (\chi,\theta,\phi)) \rightarrow (A, (x, y, z)) \rightarrow (A, (x', y', z'))$:

In [29]:
spher_to_stereoS = stereoN_to_S.restrict(A) * spher_to_stereoN
spher_to_stereoS.display()
Out[29]:
\(\displaystyle \left\{\begin{array}{lcl} {x'} & = & \frac{{\left(\cos\left({\chi}\right) + 1\right)} \cos\left({\phi}\right) \sin\left({\theta}\right)}{\sin\left({\chi}\right)} \\ {y'} & = & \frac{{\left(\cos\left({\chi}\right) + 1\right)} \sin\left({\phi}\right) \sin\left({\theta}\right)}{\sin\left({\chi}\right)} \\ {z'} & = & \frac{{\left(\cos\left({\chi}\right) + 1\right)} \cos\left({\theta}\right)}{\sin\left({\chi}\right)} \end{array}\right.\)

And the inverse transition map from $(A, (x',y',z'))$ to $(A, (\chi, \theta, \phi))$ is done through $(A, (x', y', z')) \rightarrow (A, (x, y, z)) \rightarrow (A, (\chi, \theta, \phi))$:

In [30]:
stereoS_to_spher = spher_to_stereoN.inverse() * stereoS_to_N.restrict(A)
stereoS_to_spher.display()
Out[30]:
\(\displaystyle \left\{\begin{array}{lcl} {\chi} & = & 2 \, \arctan\left(\frac{1}{\sqrt{{x'}^{2} + {y'}^{2} + {z'}^{2}}}\right) \\ {\theta} & = & \arctan\left(\frac{\sqrt{{x'}^{2} + {y'}^{2}}}{{x'}^{2} + {y'}^{2} + {z'}^{2}}, \frac{{z'}}{{x'}^{2} + {y'}^{2} + {z'}^{2}}\right) \\ {\phi} & = & \pi - \arctan\left(\frac{{y'}}{{x'}^{2} + {y'}^{2} + {z'}^{2}}, -\frac{{x'}}{{x'}^{2} + {y'}^{2} + {z'}^{2}}\right) \end{array}\right.\)

Given the creation of the charts $\verb|stereoN, stereoS|$ and, $\verb|spher|$, for the given open subsets of $\mathbb{S}^3$, we may retrieve the atlas of the manifold $\verb|S3|$ via its $\verb|atlas()|$ function:

In [31]:
S3.atlas()
Out[31]:
\(\displaystyle \left[\left(U,(x, y, z)\right), \left(V,({x'}, {y'}, {z'})\right), \left(W,(x, y, z)\right), \left(W,({x'}, {y'}, {z'})\right), \left(A,(x, y, z)\right), \left(A,({x'}, {y'}, {z'})\right), \left(A,({\chi}, {\theta}, {\phi})\right)\right]\)

Now, we may show the hyperspherical coordinates embedded mapping to $\mathbb{R}^4$ via $\verb|Phi|$:

In [32]:
Phi.display(spher, X4)
Out[32]:
\(\displaystyle \begin{array}{llcl} \Phi:& \mathbb{S}^3 & \longrightarrow & \mathbb{R}^4 \end{array}\)

The embedding mapping restricted to $A \in \mathbb{S}^3$:

In [37]:
Phi.display(stereoN.restrict(A), X4)
Out[37]:
\(\displaystyle \begin{array}{llcl} \Phi:& \mathbb{S}^3 & \longrightarrow & \mathbb{R}^4 \\ \text{on}\ A : & \left(x, y, z\right) & \longmapsto & \left(T, X, Y, Z\right) = \left(-\frac{x^{2} + y^{2} + z^{2} - 1}{x^{2} + y^{2} + z^{2} + 1}, \frac{2 \, x}{x^{2} + y^{2} + z^{2} + 1}, \frac{2 \, y}{x^{2} + y^{2} + z^{2} + 1}, \frac{2 \, z}{x^{2} + y^{2} + z^{2} + 1}\right) \end{array}\)

And the full set of embedding maps may now be retrieved via:

In [38]:
Phi.display()
Out[38]:
\(\displaystyle \begin{array}{llcl} \Phi:& \mathbb{S}^3 & \longrightarrow & \mathbb{R}^4 \\ \text{on}\ U : & \left(x, y, z\right) & \longmapsto & \left(T, X, Y, Z\right) = \left(-\frac{x^{2} + y^{2} + z^{2} - 1}{x^{2} + y^{2} + z^{2} + 1}, \frac{2 \, x}{x^{2} + y^{2} + z^{2} + 1}, \frac{2 \, y}{x^{2} + y^{2} + z^{2} + 1}, \frac{2 \, z}{x^{2} + y^{2} + z^{2} + 1}\right) \\ \text{on}\ V : & \left({x'}, {y'}, {z'}\right) & \longmapsto & \left(T, X, Y, Z\right) = \left(\frac{{x'}^{2} + {y'}^{2} + {z'}^{2} - 1}{{x'}^{2} + {y'}^{2} + {z'}^{2} + 1}, \frac{2 \, {x'}}{{x'}^{2} + {y'}^{2} + {z'}^{2} + 1}, \frac{2 \, {y'}}{{x'}^{2} + {y'}^{2} + {z'}^{2} + 1}, \frac{2 \, {z'}}{{x'}^{2} + {y'}^{2} + {z'}^{2} + 1}\right) \\ \text{on}\ A : & \left({\chi}, {\theta}, {\phi}\right) & \longmapsto & \left(T, X, Y, Z\right) = \left(\cos\left({\chi}\right), \cos\left({\phi}\right) \sin\left({\chi}\right) \sin\left({\theta}\right), \sin\left({\chi}\right) \sin\left({\phi}\right) \sin\left({\theta}\right), \cos\left({\theta}\right) \sin\left({\chi}\right)\right) \end{array}\)

Following the definition of the hyperspherical coordinate $(A, (\chi,\theta,\phi))$ and the transition map from $(U, (x,y,z))$ to $(A, (\chi,\theta,\phi))$, we may plot $(A, (\chi,\theta,\phi))$ in terms of $(U, (x,y,z))$:

In [34]:
graph = spher.plot(stereoN, 
                   number_values=7,
                   ranges={ch: (0, 0.9*pi)},
                   color={ch: 'green', th: 'blue', ph: 'red'},
                   label_axes=False)
show(graph, axes_labels=['x', 'y', 'z'])

In a similar vein, we may plot $(A, (\chi,\theta,\phi))$ in terms of $(V, (x',y',z'))$:

In [35]:
graph = spher.plot(stereoS, 
                   number_values=7,
                   ranges={ch: (0.1, pi)},
                   color={ch: 'green', th: 'blue', ph: 'red'},
                   label_axes=False)
show(graph, axes_labels=["x'", "y'", "z'"])

Last, we may use $\Phi$ embedding map to view the hyperspherical coordinates in terms of $(\mathbb{R}^4, (T, X, Y, Z))$:

In [39]:
graph = spher.plot(X4, mapping=Phi, 
                   ambient_coords=(X,Y,T),
                   number_values=7,
                   color={ch: 'green', th: 'blue', ph: 'red'},
                   label_axes=False)
show(graph, axes_labels=['X', 'Y', 'T'])
In [40]:
graph = spher.plot(X4, mapping=Phi, 
                   ambient_coords=(X,Y,Z),
                   number_values=7,
                   color={ch: 'green', th: 'blue', ph: 'red'},
                   label_axes=False)
show(graph, axes_labels=['X', 'Y', 'Z'])

Section 3. $\mathbb{R}^4$ to $\mathbb{S}^3$ Projection¶

Now, lets define the projection map from an open subset of $\mathbb{R}^4$ to $\mathbb{S}^3$; in this case, we'll take $\mathbb{R}^4$ minus the hyperplane $T = -1$:

In [41]:
R4N = R4.open_subset('R4N', latex_name=r'\mathbb{R}^4_N', 
                     coord_def={X4: T!=-1})
X4N = X4.restrict(R4N)
In [42]:
ProjN = R4N.diff_map(U, {(X4N, stereoN): 
                         [X/(1+T), Y/(1+T), Z/(1+T)]},
                     name='P_N', latex_name=r'\Pi_N')
ProjN.display()
Out[42]:
\(\displaystyle \begin{array}{llcl} \Pi_N:& \mathbb{R}^4_N & \longrightarrow & U \\ & \left(T, X, Y, Z\right) & \longmapsto & \left(x, y, z\right) = \left(\frac{X}{T + 1}, \frac{Y}{T + 1}, \frac{Z}{T + 1}\right) \end{array}\)

Given the projection $\Pi_N: \mathbb{R}^4 \rightarrow \mathbb{S}^3$ and embedding $\Phi: \mathbb{S}^3 \rightarrow \mathbb{R}^4$, we may verify that the composition of these operators, $\Pi_N \circ \Phi$, on a given point in $\mathbb{S}^3$ reduces to the identity:

In [43]:
var('a b c', domain='real')
p = S3((a,b,c), chart=stereoN)
ProjN(Phi(p)) == p
Out[43]:
\(\displaystyle \mathrm{True}\)

Section 4. Quaternions and its Algebra¶

We'll now consider the algebra of hypercomplex numbers, called quaternions. Quaternions are used to describe rotations and provide an elegant and efficient way to perform calculations involving rotations. Quaternions are written as $T + Xi + Yj + Zk$, where $T, X, Y,$ and $Z$ are real numbers, and $i, j$, and $k$ are imaginary numbers satisfying

\begin{equation*} \begin{split} i^2 = j^2 = k^2 = ijk = -1 \\ ij = k, \; jk = i, \; ki = j\\ ji = -k, \; kj = -i, \; ik = -j \\ \end{split} \end{equation*}

The algebra shows that the order of multiplication matters. Henceforth, for a pair of quaternions, such as $q_1 = T_1 + X_1i + Y_1j + Z_1k$ and $q_2 = T_2 + X_2i + Y_2j + Z_2k$, the product is

\begin{equation*} \begin{split} q_1q_2 = (T_1T_2 - X_1X_2 - Y_1Y_2 - Z_1Z_2) + (T_1X_2 + X_1T_2 + Y_1Z_2 - Z_1Y_2)i + (T_1Y_2 - X_1Z_2 + Y_1T_2 + Z_1X_2)j + (T_1Z_2 + X_1Y_2 - Y_1X_2 + Z_1T_2)k \end{split} \end{equation*}

Below, we create the function for the product of quaternions. Note, we extend the definition of quaternion product to $\mathbb{S}^3$ via the embedding map $\Phi$:

In [46]:
def qprod(p,q):
    if p in R4 and q in R4:
        T1, X1, Y1, Z1 = X4(p)
        T2, X2, Y2, Z2 = X4(q)
        return R4(((T1*T2-X1*X2-Y1*Y2-Z1*Z2).simplify_full(),
                   (T1*X2+X1*T2+Y1*Z2-Z1*Y2).simplify_full(),
                   (T1*Y2-X1*Z2+Y1*T2+Z1*X2).simplify_full(),
                   (T1*Z2+X1*Y2-Y1*X2+Z1*T2).simplify_full()))
    if p in S3 and q in S3:
        a = qprod(Phi(p),Phi(q))
        if X4(a) == (-1,0,0,0):
            return N
        return ProjN(R4N(a))
    raise ValueError("Cannot evaluate qprod of {} and {}".format(p,q))

Next, we'll construct the points $\hat{1}, -\hat{1}, \hat{i}, \hat{j}$, and $\hat{k}$, where $\hat{1}$ and -$\hat{1}$ are the South and North pole of $\mathbb{S}^3$ stereographic charts, and $\hat{i}, \hat{j}$, and $\hat{k}$ are the quaternion imaginary units. Following that, we perform quaternion products using $\verb|qprod()|$:

For $\hat{1} \in \mathbb{S}^3$, it's identified with $\Phi(\hat{1}) = (1,0,0,0) \in \mathbb{R}^4$, as shown:

In [47]:
One = S3((0,0,0), chart=stereoN, name='1', latex_name=r'\mathbf{1}')
X4(Phi(One))
Out[47]:
\(\displaystyle \left(1, 0, 0, 0\right)\)

For $-\hat{1} \in \mathbb{S}^3$, it's identified with $\Phi(-\hat{1}) = (-1,0,0,0) \in \mathbb{R}^4$, as shown:

In [48]:
minusOne = S3((0,0,0), chart=stereoS, name='-1', latex_name=r'-\mathbf{1}')
X4(Phi(minusOne))
Out[48]:
\(\displaystyle \left(-1, 0, 0, 0\right)\)

For $\hat{i} \in \mathbb{S}^3$, it's identified with $\Phi(\hat{i}) = (0,1,0,0) \in \mathbb{R}^4$, as shown:

In [49]:
I = S3((1,0,0), chart=stereoN, name='i', latex_name=r'\mathbf{i}')
X4(Phi(I))
Out[49]:
\(\displaystyle \left(0, 1, 0, 0\right)\)
In [50]:
stereoS(I)
Out[50]:
\(\displaystyle \left(1, 0, 0\right)\)

For $\hat{j} \in \mathbb{S}^3$, it's identified with $\Phi(\hat{j}) = (0,0,1,0) \in \mathbb{R}^4$, as shown:

In [51]:
J = S3((0,1,0), chart=stereoN, name='j', latex_name=r'\mathbf{j}')
X4(Phi(J))
Out[51]:
\(\displaystyle \left(0, 0, 1, 0\right)\)
In [52]:
stereoS(J)
Out[52]:
\(\displaystyle \left(0, 1, 0\right)\)
In [53]:
spher(J)
Out[53]:
\(\displaystyle \left(\frac{1}{2} \, \pi, \frac{1}{2} \, \pi, \frac{1}{2} \, \pi\right)\)

For $\hat{k} \in \mathbb{S}^3$, it's identified with $\Phi(\hat{k}) = (0,0,0,1) \in \mathbb{R}^4$, as shown:

In [54]:
K = S3((0,0,1), chart=stereoN, name='k', latex_name=r'\mathbf{k}')
X4(Phi(K))
Out[54]:
\(\displaystyle \left(0, 0, 0, 1\right)\)
In [55]:
stereoS(K)
Out[55]:
\(\displaystyle \left(0, 0, 1\right)\)

Now we may perform further verification of the quaternion product of the quaternion basis elements $(\hat{1},\hat{i},\hat{j},\hat{k})$, including $-\hat{1}$. First, we'll verify that $\hat{i}\hat{j}\hat{k} = -\hat{1}$:

In [56]:
qprod(I, qprod(J,K)) == minusOne
Out[56]:
\(\displaystyle \mathrm{True}\)

Next, verify $\hat{i}\hat{j} = \hat{k}$, $\hat{j}\hat{k} = \hat{i}$, and $\hat{k}\hat{i} = \hat{j}$

In [57]:
all([qprod(I,J) == K, qprod(J,K) == I,
     qprod(K,I) == J])
Out[57]:
\(\displaystyle \mathrm{True}\)

Then, verify $\hat{1}^2=\hat{1}$, $\hat{i}^2=-\hat{1}$, $\hat{j}^2=-\hat{1}$, and $\hat{k}^2=-\hat{1}$

In [58]:
all([qprod(One,One) == One, qprod(I,I) == minusOne,
     qprod(J,J) == minusOne, qprod(K,K) == minusOne])
Out[58]:
\(\displaystyle \mathrm{True}\)

Furthermore, we construct the quaternion conjugate of each imaginary unit, $(\hat{i},\hat{j},\hat{k})$, by taking the quaternion product of $-\hat{1}$ with each imaginary unit:

In [59]:
minusI = qprod(minusOne, I)
X4(Phi(minusI))
Out[59]:
\(\displaystyle \left(0, -1, 0, 0\right)\)
In [60]:
minusJ = qprod(minusOne, J)
X4(Phi(minusJ))
Out[60]:
\(\displaystyle \left(0, 0, -1, 0\right)\)
In [61]:
minusK = qprod(minusOne, K)
X4(Phi(minusK))
Out[61]:
\(\displaystyle \left(0, 0, 0, -1\right)\)

For the quaternion algebra, the conjugate of a quaternion $q = T + Xi + Yj + Zk$ is $\tilde{q} = T - Xi - Yj - Zk$, where $\tilde{1} = 1, \; \tilde{i} = -i, \; \tilde{j} = -j$, and $\tilde{k} = -k$. We construct a function, $\verb|qconj()|$, to implement this:

In [62]:
def qconj(p):
    if p in R4:
        T, X, Y, Z = X4(p)
        return R4((T, -X, -Y, -Z))
    if p in S3:
        a = qconj(Phi(p))
        if X4(a) == (-1,0,0,0):
            return N
        return ProjN(a)
    raise ValueError("Cannot evaluate qconf of {}".format(p)) 
In [63]:
all([qconj(One) == One, 
     qconj(I) == minusI,
     qconj(J) == minusJ, 
     qconj(K) == minusK])
Out[63]:
\(\displaystyle \mathrm{True}\)

Hence, the conjugate of a point $\verb|p| \in \mathbb{S}^3$ is computed as

In [64]:
assume(a != 0)  # to ensure that qconj(p) is never N or S, the North and South pole, respectively
p = S3((a,b,c), chart=stereoN)
stereoN(qconj(p))
Out[64]:
\(\displaystyle \left(-a, -b, -c\right)\)
In [65]:
p = S3((a,b,c), chart=stereoS)
stereoS(qconj(p))
Out[65]:
\(\displaystyle \left(-a, -b, -c\right)\)
In [66]:
forget(a!=0)

Now, the manifold $\mathbb{S}^3$ is viewed as the set of unit quaternions, where $\| q \| = \sqrt{q\tilde{q}}$ coincides with the Euclidean norm in $\mathbb{R}^4$. We construct the function $\verb|qnorm()|$ to implement this norm:

In [67]:
def qnorm(p):
    if p in R4:
        T, X, Y, Z = X4(p)
        return (sqrt(T^2 + X^2 + Y^2 + Z^2)).simplify_full()
    if p in S3:
        return 1
    raise ValueError("Cannot evaluate qnorm of {}".format(p)) 
In [68]:
var('d', domain='real')
q = R4((a,b,c,d))
qnorm(q)
Out[68]:
\(\displaystyle \sqrt{a^{2} + b^{2} + c^{2} + d^{2}}\)

$(\hat{1}, \hat{i}, \hat{j}, \hat{k})$ are unit norms

In [69]:
(qnorm(One), qnorm(I), qnorm(J), qnorm(K)) == (1, 1, 1, 1)
Out[69]:
\(\displaystyle \mathrm{True}\)

We may now verify that $\| q \|^2 = q\tilde{q}$

In [70]:
R4((qnorm(q)^2,0,0,0)) == qprod(q, qconj(q))
Out[70]:
\(\displaystyle \mathrm{True}\)

Section 5. Hopf Map¶

We'll now start prefacing the map of $\mathbb{S}^3$ to a $\mathbb{S}^2$ manifold with a coordinate mapping of points in $\mathbb{S}^3$ to a 2-sphere of unit imaginary quaternions, $\text{Im}\mathbb{H}$. We first implement the following of mapping on $\mathbb{R}^4$,

\begin{equation*} \begin{split} C : \mathbb{R}^4 \rightarrow \mathbb{R}^4 \\ p \mapsto p\textbf{k}\tilde{p} \end{split} \end{equation*}
In [71]:
p = R4((T,X,Y,Z)) # a generic point of R^4
coord_Cp = X4(  qprod(p, qprod(Phi(K), qconj(p))) )
coord_Cp
Out[71]:
\(\displaystyle \left(0, 2 \, T Y + 2 \, X Z, -2 \, T X + 2 \, Y Z, T^{2} - X^{2} - Y^{2} + Z^{2}\right)\)

Set the coordinate mapping as a differential map on $\mathbb{R}^4$:

In [72]:
C = R4.diff_map(R4, coord_Cp, name='C')
C.display()
Out[72]:
\(\displaystyle \begin{array}{llcl} C:& \mathbb{R}^4 & \longrightarrow & \mathbb{R}^4 \\ & \left(T, X, Y, Z\right) & \longmapsto & \left(0, 2 \, T Y + 2 \, X Z, -2 \, T X + 2 \, Y Z, T^{2} - X^{2} - Y^{2} + Z^{2}\right) \end{array}\)

Then, restrict the above map to $\mathbb{S}^3$ via $\Phi$, where $C \circ \Phi: \mathbb{S}^3 \rightarrow \mathbb{R}^4$:

In [73]:
CS = C * Phi
CS.display()
Out[73]:
\(\displaystyle \begin{array}{llcl} & \mathbb{S}^3 & \longrightarrow & \mathbb{R}^4 \\ \text{on}\ U : & \left(x, y, z\right) & \longmapsto & \left(T, X, Y, Z\right) = \left(0, -\frac{4 \, {\left(y^{3} + y z^{2} + {\left(x^{2} - 1\right)} y - 2 \, x z\right)}}{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} + 1\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} + 2 \, x^{2} + 1}, \frac{4 \, {\left(x^{3} + x y^{2} + x z^{2} + 2 \, y z - x\right)}}{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} + 1\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} + 2 \, x^{2} + 1}, \frac{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} - 3\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} - 6 \, x^{2} + 1}{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} + 1\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} + 2 \, x^{2} + 1}\right) \\ \text{on}\ V : & \left({x'}, {y'}, {z'}\right) & \longmapsto & \left(T, X, Y, Z\right) = \left(0, \frac{4 \, {\left({y'}^{3} + {y'} {z'}^{2} + {\left({x'}^{2} - 1\right)} {y'} + 2 \, {x'} {z'}\right)}}{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} + 1\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} + 2 \, {x'}^{2} + 1}, -\frac{4 \, {\left({x'}^{3} + {x'} {y'}^{2} + {x'} {z'}^{2} - 2 \, {y'} {z'} - {x'}\right)}}{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} + 1\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} + 2 \, {x'}^{2} + 1}, \frac{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} - 3\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} - 6 \, {x'}^{2} + 1}{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} + 1\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} + 2 \, {x'}^{2} + 1}\right) \\ \text{on}\ A : & \left({\chi}, {\theta}, {\phi}\right) & \longmapsto & \left(T, X, Y, Z\right) = \left(0, 2 \, {\left(\cos\left({\phi}\right) \cos\left({\theta}\right) \sin\left({\chi}\right)^{2} + \cos\left({\chi}\right) \sin\left({\chi}\right) \sin\left({\phi}\right)\right)} \sin\left({\theta}\right), 2 \, {\left(\cos\left({\theta}\right) \sin\left({\chi}\right)^{2} \sin\left({\phi}\right) - \cos\left({\chi}\right) \cos\left({\phi}\right) \sin\left({\chi}\right)\right)} \sin\left({\theta}\right), -2 \, \sin\left({\chi}\right)^{2} \sin\left({\theta}\right)^{2} + 1\right) \end{array}\)

As shown, $T=0$ across the open subsets in $\mathbb{S}^3$, meaning that the codomain is in the $T=0$ hyperplane. The $T=0$ hyperplane is the pure imaginary quaternions space $\text{Im}\mathbb{H}$.

Matter of fact, if we take an arbitrary point $p \in U \subset \mathbb{S}^3$:

In [74]:
p = S3((a,b,c), chart=stereoN)

And compute the quaternion norm:

In [75]:
qnorm(CS(p))
Out[75]:
\(\displaystyle 1\)

We get the unit length. Additonally, we get the same for the North and South pole.

In [76]:
all([qnorm(CS(N)) == 1, qnorm(CS(S)) == 1])
Out[76]:
\(\displaystyle \mathrm{True}\)

Hence, $C \circ \Phi(\mathbb{S}^3)$ maps to a 2-sphere of unit imaginary quaternions, $\Phi(\mathbb{S}^3) \cap \text{Im}\mathbb{H}$. In this space, the following are equivalent:

In [77]:
all([CS(K) == Phi(K), CS(One) == Phi(K), CS(minusOne) == Phi(K)])
Out[77]:
\(\displaystyle \mathrm{True}\)
In [78]:
all([CS(I) == Phi(minusK), CS(J) == Phi(minusK),
     CS(minusI) == Phi(minusK), CS(minusJ) == Phi(minusK)])
Out[78]:
\(\displaystyle \mathrm{True}\)

Now, note that our previously defined projection operator $\Pi_N : \mathbb{R}^4_N \rightarrow \mathbb{S}^3$ coincides with an inverse embedding of $\Phi$ applied to $C \circ \Phi(\mathbb{S}^3)$, given that $\Phi(\mathbb{S}^3) \cap \text{Im}\mathbb{H} \subset \mathbb{R}^4_N$. Hence, we may perform the inverse embedding as:

\begin{equation*} H = \Pi_N \circ C \circ \Phi : \mathbb{S}^3 \rightarrow \mathbb{S}^3 \end{equation*}
In [79]:
H = ProjN * CS.restrict(S3, subcodomain=R4N)
In [80]:
H.display()
Out[80]:
\(\displaystyle \begin{array}{llcl} & \mathbb{S}^3 & \longrightarrow & U \\ \text{on}\ U : & \left(x, y, z\right) & \longmapsto & \left(-\frac{4 \, {\left(y^{3} + y z^{2} + {\left(x^{2} - 1\right)} y - 2 \, x z\right)}}{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} + 1\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} + 2 \, x^{2} + 1}, \frac{4 \, {\left(x^{3} + x y^{2} + x z^{2} + 2 \, y z - x\right)}}{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} + 1\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} + 2 \, x^{2} + 1}, \frac{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} - 3\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} - 6 \, x^{2} + 1}{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} + 1\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} + 2 \, x^{2} + 1}\right) \\ \text{on}\ V : & \left({x'}, {y'}, {z'}\right) & \longmapsto & \left(x, y, z\right) = \left(\frac{4 \, {\left({y'}^{3} + {y'} {z'}^{2} + {\left({x'}^{2} - 1\right)} {y'} + 2 \, {x'} {z'}\right)}}{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} + 1\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} + 2 \, {x'}^{2} + 1}, -\frac{4 \, {\left({x'}^{3} + {x'} {y'}^{2} + {x'} {z'}^{2} - 2 \, {y'} {z'} - {x'}\right)}}{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} + 1\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} + 2 \, {x'}^{2} + 1}, \frac{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} - 3\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} - 6 \, {x'}^{2} + 1}{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} + 1\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} + 2 \, {x'}^{2} + 1}\right) \\ \text{on}\ A : & \left({\chi}, {\theta}, {\phi}\right) & \longmapsto & \left(x, y, z\right) = \left(2 \, {\left(\cos\left({\phi}\right) \cos\left({\theta}\right) \sin\left({\chi}\right)^{2} + \cos\left({\chi}\right) \sin\left({\chi}\right) \sin\left({\phi}\right)\right)} \sin\left({\theta}\right), 2 \, {\left(\cos\left({\theta}\right) \sin\left({\chi}\right)^{2} \sin\left({\phi}\right) - \cos\left({\chi}\right) \cos\left({\phi}\right) \sin\left({\chi}\right)\right)} \sin\left({\theta}\right), -2 \, \sin\left({\chi}\right)^{2} \sin\left({\theta}\right)^{2} + 1\right) \end{array}\)

Additionally, the codomain of $C \circ \Phi$ excludes $T=-1$ (the North pole) and $T=1$ (the South pole). Thus, the codomain of $\verb|H|$ may be restricted to $W = U \cap V$, as defined earlier in the text:

In [81]:
H = H.restrict(S3, subcodomain=W)
H.display()
Out[81]:
\(\displaystyle \begin{array}{llcl} & \mathbb{S}^3 & \longrightarrow & W \\ \text{on}\ U : & \left(x, y, z\right) & \longmapsto & \left(x, y, z\right) = \left(-\frac{4 \, {\left(y^{3} + y z^{2} + {\left(x^{2} - 1\right)} y - 2 \, x z\right)}}{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} + 1\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} + 2 \, x^{2} + 1}, \frac{4 \, {\left(x^{3} + x y^{2} + x z^{2} + 2 \, y z - x\right)}}{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} + 1\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} + 2 \, x^{2} + 1}, \frac{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} - 3\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} - 6 \, x^{2} + 1}{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} + 1\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} + 2 \, x^{2} + 1}\right) \\ \text{on}\ U : & \left(x, y, z\right) & \longmapsto & \left({x'}, {y'}, {z'}\right) = \left(-\frac{4 \, {\left(y^{3} + y z^{2} + {\left(x^{2} - 1\right)} y - 2 \, x z\right)}}{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} + 1\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} + 2 \, x^{2} + 1}, \frac{4 \, {\left(x^{3} + x y^{2} + x z^{2} + 2 \, y z - x\right)}}{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} + 1\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} + 2 \, x^{2} + 1}, \frac{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} - 3\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} - 6 \, x^{2} + 1}{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} + 1\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} + 2 \, x^{2} + 1}\right) \\ \text{on}\ V : & \left({x'}, {y'}, {z'}\right) & \longmapsto & \left(x, y, z\right) = \left(\frac{4 \, {\left({y'}^{3} + {y'} {z'}^{2} + {\left({x'}^{2} - 1\right)} {y'} + 2 \, {x'} {z'}\right)}}{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} + 1\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} + 2 \, {x'}^{2} + 1}, -\frac{4 \, {\left({x'}^{3} + {x'} {y'}^{2} + {x'} {z'}^{2} - 2 \, {y'} {z'} - {x'}\right)}}{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} + 1\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} + 2 \, {x'}^{2} + 1}, \frac{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} - 3\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} - 6 \, {x'}^{2} + 1}{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} + 1\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} + 2 \, {x'}^{2} + 1}\right) \\ \text{on}\ V : & \left({x'}, {y'}, {z'}\right) & \longmapsto & \left({x'}, {y'}, {z'}\right) = \left(\frac{4 \, {\left({y'}^{3} + {y'} {z'}^{2} + {\left({x'}^{2} - 1\right)} {y'} + 2 \, {x'} {z'}\right)}}{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} + 1\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} + 2 \, {x'}^{2} + 1}, -\frac{4 \, {\left({x'}^{3} + {x'} {y'}^{2} + {x'} {z'}^{2} - 2 \, {y'} {z'} - {x'}\right)}}{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} + 1\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} + 2 \, {x'}^{2} + 1}, \frac{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} - 3\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} - 6 \, {x'}^{2} + 1}{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} + 1\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} + 2 \, {x'}^{2} + 1}\right) \\ \text{on}\ A : & \left({\chi}, {\theta}, {\phi}\right) & \longmapsto & \left(x, y, z\right) = \left(2 \, {\left(\cos\left({\phi}\right) \cos\left({\theta}\right) \sin\left({\chi}\right)^{2} + \cos\left({\chi}\right) \sin\left({\chi}\right) \sin\left({\phi}\right)\right)} \sin\left({\theta}\right), 2 \, {\left(\cos\left({\theta}\right) \sin\left({\chi}\right)^{2} \sin\left({\phi}\right) - \cos\left({\chi}\right) \cos\left({\phi}\right) \sin\left({\chi}\right)\right)} \sin\left({\theta}\right), -2 \, \sin\left({\chi}\right)^{2} \sin\left({\theta}\right)^{2} + 1\right) \\ \text{on}\ A : & \left({\chi}, {\theta}, {\phi}\right) & \longmapsto & \left({x'}, {y'}, {z'}\right) = \left(2 \, {\left(\cos\left({\phi}\right) \cos\left({\theta}\right) \sin\left({\chi}\right)^{2} + \cos\left({\chi}\right) \sin\left({\chi}\right) \sin\left({\phi}\right)\right)} \sin\left({\theta}\right), 2 \, {\left(\cos\left({\theta}\right) \sin\left({\chi}\right)^{2} \sin\left({\phi}\right) - \cos\left({\chi}\right) \cos\left({\phi}\right) \sin\left({\chi}\right)\right)} \sin\left({\theta}\right), -2 \, \sin\left({\chi}\right)^{2} \sin\left({\theta}\right)^{2} + 1\right) \end{array}\)

Now, the mapping of each quaternion imaginary unit and the antipodal points, $\hat{1}$ and -$\hat{1}$, are as followed:

In [82]:
all([H(K) == K, H(One) == K, H(minusK) == K, 
     H(minusOne) == K])
Out[82]:
\(\displaystyle \mathrm{True}\)
In [83]:
all([H(I) == minusK, H(J) == minusK])
Out[83]:
\(\displaystyle \mathrm{True}\)

And, if we take the mapping of the prescribed stereographic coordinates, we get the unit length norm, as expected:

In [84]:
Hx, Hy, Hz = H.expr(stereoN, stereoN)
(Hx.factor(), Hy.factor(), Hz.factor())
Out[84]:
\(\displaystyle \left(-\frac{4 \, {\left(x^{2} y + y^{3} + y z^{2} - 2 \, x z - y\right)}}{{\left(x^{2} + y^{2} + z^{2} + 1\right)}^{2}}, \frac{4 \, {\left(x^{3} + x y^{2} + x z^{2} + 2 \, y z - x\right)}}{{\left(x^{2} + y^{2} + z^{2} + 1\right)}^{2}}, \frac{x^{4} + 2 \, x^{2} y^{2} + y^{4} + 2 \, x^{2} z^{2} + 2 \, y^{2} z^{2} + z^{4} - 6 \, x^{2} - 6 \, y^{2} + 2 \, z^{2} + 1}{{\left(x^{2} + y^{2} + z^{2} + 1\right)}^{2}}\right)\)
In [85]:
(Hx^2 + Hy^2 + Hz^2).simplify_full()
Out[85]:
\(\displaystyle 1\)

Hence, the codomain of $\verb|H|$ lies in the 2-sphere of equation $x^2 + y^2 + z^2 = 1$ where $(x,y,z)$ are the stereographic coordinates. Thus, lets construct the 2-sphere codomain to prescribe charts, coordinates, transition maps, and smooth maps on the 2-sphere, as was done for $\mathbb{S^3}$. Most importantly, this is the codomain space of the Hopf map.

The manifold object $\mathbb{S}^2$:

In [86]:
S2 = Manifold(2, 'S^2', latex_name=r'\mathbb{S}^2')
print(S2)
2-dimensional differentiable manifold S^2

The open subset and charts $(U_2,(x_2,y_2))$ and $(V_2,(x'_2,y'_2))$:

In [87]:
U2 = S2.open_subset('U_2')
V2 = S2.open_subset('V_2')
S2.declare_union(U2, V2)
In [88]:
stereoN2.<x2,y2> = U2.chart("x2:x_2 y2:y_2")
stereoN2
Out[88]:
\(\displaystyle \left(U_2,({x_2}, {y_2})\right)\)
In [89]:
stereoS2.<xp2,yp2> = V2.chart(r"xp2:{x'}_2 yp2:{y'}_2")
stereoS2
Out[89]:
\(\displaystyle \left(V_2,({{x'}_2}, {{y'}_2})\right)\)

The transition map between charts:

In [90]:
stereoN_to_S2 = stereoN2.transition_map(stereoS2, 
                                        (x2/(x2^2+y2^2), y2/(x2^2+y2^2)), 
                                        intersection_name='W_2',
                                        restrictions1= x2^2+y2^2!=0, 
                                        restrictions2= xp2^2+xp2^2!=0)
stereoN_to_S2.display()
Out[90]:
\(\displaystyle \left\{\begin{array}{lcl} {{x'}_2} & = & \frac{{x_2}}{{x_2}^{2} + {y_2}^{2}} \\ {{y'}_2} & = & \frac{{y_2}}{{x_2}^{2} + {y_2}^{2}} \end{array}\right.\)
In [91]:
stereoS_to_N2 = stereoN_to_S2.inverse()
stereoS_to_N2.display()
Out[91]:
\(\displaystyle \left\{\begin{array}{lcl} {x_2} & = & \frac{{{x'}_2}}{{{x'}_2}^{2} + {{y'}_2}^{2}} \\ {y_2} & = & \frac{{{y'}_2}}{{{x'}_2}^{2} + {{y'}_2}^{2}} \end{array}\right.\)

The intersection of $U_2$ and $V_2$, defined as $\verb|W2|$:

In [92]:
W2 = U2.intersection(V2)

Next, we provide the embed mapping from $\mathbb{S}^2$ to $U \subset \mathbb{S}^3$, considering the North pole of the stereographic coordinates above is $\hat{k} = (0, 0, 1)$. An analogous map could be done by considering the South pole, $-\hat{k} = (0, 0, -1)$, of the above stereographic coordinates:

In [93]:
Phi2 = S2.diff_map(S3, {(stereoN2, stereoN): 
                        [2*x2/(1+x2^2+y2^2), 
                         2*y2/(1+x2^2+y2^2),
                         (x2^2+y2^2-1)/(1+x2^2+y2^2)],
                        (stereoS2, stereoN): 
                        [2*xp2/(1+xp2^2+yp2^2), 
                         2*yp2/(1+xp2^2+yp2^2),
                         (1-xp2^2-yp2^2)/(1+xp2^2+yp2^2)]},
                   name='Phi2', latex_name=r'\Phi_2')
Phi2.display()
Out[93]:
\(\displaystyle \begin{array}{llcl} \Phi_2:& \mathbb{S}^2 & \longrightarrow & \mathbb{S}^3 \\ \text{on}\ U_2 : & \left({x_2}, {y_2}\right) & \longmapsto & \left(x, y, z\right) = \left(\frac{2 \, {x_2}}{{x_2}^{2} + {y_2}^{2} + 1}, \frac{2 \, {y_2}}{{x_2}^{2} + {y_2}^{2} + 1}, \frac{{x_2}^{2} + {y_2}^{2} - 1}{{x_2}^{2} + {y_2}^{2} + 1}\right) \\ \text{on}\ V_2 : & \left({{x'}_2}, {{y'}_2}\right) & \longmapsto & \left(x, y, z\right) = \left(\frac{2 \, {{x'}_2}}{{{x'}_2}^{2} + {{y'}_2}^{2} + 1}, \frac{2 \, {{y'}_2}}{{{x'}_2}^{2} + {{y'}_2}^{2} + 1}, -\frac{{{x'}_2}^{2} + {{y'}_2}^{2} - 1}{{{x'}_2}^{2} + {{y'}_2}^{2} + 1}\right) \end{array}\)

The base imaginary units of $\mathbb{S}^2$ are $(\hat{i}, \hat{j}, \hat{k}, -\hat{k})$:

In [94]:
I2 = S2((1,0), chart=stereoN2)
J2 = S2((0,1), chart=stereoN2)
K2 = S2((0,0), chart=stereoS2)
minusK2 = S2((0,0), chart=stereoN2)
In [95]:
all([Phi2(I2) == I, Phi2(J2) == J,
     Phi2(K2) == K, Phi2(minusK2) == minusK])
Out[95]:
\(\displaystyle \mathrm{True}\)

Now, as done for $\mathbb{S}^3$, we provide a mapping of the stereographic coordinates to and from the respective spherical coordinates of $\mathbb{S}^2$:

In [96]:
A2 = W2.open_subset('A_2', 
                    coord_def={stereoN2.restrict(W2): (y2!=0, x2<0), 
                               stereoS2.restrict(W2): (yp2!=0, xp2<0)})
spher2.<th2,ph2> = A2.chart(r'th2:(0,pi):\theta_2 ph2:(0,2*pi):\phi_2')
spher2_to_stereoN2 = spher2.transition_map(stereoN2.restrict(A2), 
                                        (sin(th2)*cos(ph2)/(1-cos(th2)),
                                         sin(th2)*sin(ph2)/(1-cos(th2))))
spher2_to_stereoN2.set_inverse(2*atan(1/sqrt(x2^2+y2^2)), 
                               atan2(-y2,-x2)+pi)
spher2_to_stereoS2 = stereoN_to_S2.restrict(A2) * spher2_to_stereoN2
stereoS2_to_spher2 = spher2_to_stereoN2.inverse() * \
                     stereoN_to_S2.inverse().restrict(A2)
Check of the inverse coordinate transformation:
  th2 == 2*arctan(sqrt(-cos(th2) + 1)/sqrt(cos(th2) + 1))  **failed**
  ph2 == pi + arctan2(sin(ph2)*sin(th2)/(cos(th2) - 1), cos(ph2)*sin(th2)/(cos(th2) - 1))  **failed**
  x2 == x2  *passed*
  y2 == y2  *passed*
NB: a failed report can reflect a mere lack of simplification.

Thus, the atlas of $\mathbb{S}^2$ via $\verb|atlas()|$ of the respective open subset of $\mathbb{S}^2$ is:

In [97]:
A2.atlas()
Out[97]:
\(\displaystyle \left[\left(A_2,({x_2}, {y_2})\right), \left(A_2,({{x'}_2}, {{y'}_2})\right), \left(A_2,({\theta_2}, {\phi_2})\right)\right]\)

Next, we'll define the projection map from $\mathbb{S}^3$ to $U_2 \subset \mathbb{S}^2$, given an open subset object of $W \subset \mathbb{S}^3$, where $z \neq 1$:

In [98]:
Wz1 = W.open_subset('Wz1', latex_name=r'W_{z\not=1}', 
                    coord_def={stereoN.restrict(W): z!=1})
In [99]:
all([I in Wz1, J in Wz1, minusK in Wz1,
     K not in Wz1, One not in Wz1, minusOne not in Wz1])
Out[99]:
\(\displaystyle \mathrm{True}\)
In [100]:
Proj2N = Wz1.diff_map(U2, {(stereoN.restrict(Wz1), stereoN2): 
                           [x/(1-z), y/(1-z)]},
                      name='P_2^N', latex_name=r'\Pi_2^N')
Proj2N.display()
Out[100]:
\(\displaystyle \begin{array}{llcl} \Pi_2^N:& W_{z\not=1} & \longrightarrow & U_2 \\ & \left(x, y, z\right) & \longmapsto & \left({x_2}, {y_2}\right) = \left(-\frac{x}{z - 1}, -\frac{y}{z - 1}\right) \end{array}\)

Next, verify the defined composition of maps, $\Pi^N_2 \circ \Phi_2$, and its inverse, given arbitrary points in $U_2$ and $U$:

In [101]:
p = U2((a,b), chart=stereoN2)
Proj2N(Phi2(p)) == p
Out[101]:
\(\displaystyle \mathrm{True}\)
In [102]:
assume(cos(a)!=1, cos(a)!=0)
p = U((sin(a)*cos(b), sin(a)*sin(b), cos(a)), chart=stereoN)
Phi2(Proj2N(p)) == p
Out[102]:
\(\displaystyle \mathrm{True}\)
In [103]:
forget(cos(a)!=1, cos(a)!=0)

Now, define the projection map from $\mathbb{S}^3$ to $V_2 \subset \mathbb{S}^2$, given an open subset object of $W \subset \mathbb{S}^3$, where $z \neq -1$:

In [104]:
Wzm1 = W.open_subset('Wzm1', latex_name=r'W_{z\not=-1}', 
                     coord_def={stereoN.restrict(W): z!=-1})
In [105]:
all([I in Wzm1, J in Wzm1, K in Wzm1,
     minusK not in Wzm1, One not in Wzm1, 
     minusOne not in Wzm1])
Out[105]:
\(\displaystyle \mathrm{True}\)
In [106]:
Proj2S = Wzm1.diff_map(V2, {(stereoN.restrict(Wzm1), stereoS2): 
                            [x/(1+z), y/(1+z)]},
                       name='P_2^S', latex_name=r'\Pi_2^S')
Proj2S.display()
Out[106]:
\(\displaystyle \begin{array}{llcl} \Pi_2^S:& W_{z\not=-1} & \longrightarrow & V_2 \\ & \left(x, y, z\right) & \longmapsto & \left({{x'}_2}, {{y'}_2}\right) = \left(\frac{x}{z + 1}, \frac{y}{z + 1}\right) \end{array}\)

Verify the defined composition of maps, $\Pi^S_2 \circ \Phi_2$, and its inverse, given arbitrary points in $V_2$ and $U$:

In [107]:
p = V2((a,b), chart=stereoS2)
Proj2S(Phi2(p)) == p
Out[107]:
\(\displaystyle \mathrm{True}\)
In [108]:
assume(cos(a)!=-1, cos(a)!=0)
p = U((sin(a)*cos(b), sin(a)*sin(b), cos(a)), chart=stereoN)
Phi2(Proj2S(p)) == p
Out[108]:
\(\displaystyle \mathrm{True}\)
In [109]:
forget(cos(a)!=-1, cos(a)!=0)

Now, lets finalize on the Hopf map, from $\mathbb{S}^3$ to $\mathbb{S}^2$. First, choose all sets of points $p \in U$, such that $H(p) \neq \hat{k}$ and $H(p) \in U_2$. This equates to $H(p) \in W_{z \neq 1}$. On the chart $(U,(x,y,z))$, the z-coordinate of the given $H(p)$ mapping is as followed:

In [110]:
Hx, Hy, Hz = H.expr(stereoN, stereoN)
Hz
Out[110]:
\(\displaystyle \frac{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} - 3\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} - 6 \, x^{2} + 1}{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} + 1\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} + 2 \, x^{2} + 1}\)

To provide the restriction, $z(H(p)) \neq 1$, we take the difference between the numerator and denominator, simplify, and then apply the constraint, shown below, to the chart $(U,(x,y,z))$:

In [111]:
Hz.numerator() - Hz.denominator() != 0
Out[111]:
\(\displaystyle -8 \, x^{2} - 8 \, y^{2} \neq 0\)
In [112]:
D1 = U.open_subset('D_1', coord_def=({stereoN: x^2+y^2!=0}))
stereoN_D1 = stereoN.restrict(D1)

The restriction of $H$ to $D_1$ has $W_{z \neq 1}$ as the codomain, and thus, the image of $H$ on $D_1$ is to be contained in $\mathbb{S}^2$ via $\Pi^N_2$:

In [113]:
hD1 = Proj2N * H.restrict(D1, subcodomain=Wz1)
hD1.display()
Out[113]:
\(\displaystyle \begin{array}{llcl} & D_1 & \longrightarrow & U_2 \\ & \left(x, y, z\right) & \longmapsto & \left({x_2}, {y_2}\right) = \left(-\frac{y^{3} + y z^{2} + {\left(x^{2} - 1\right)} y - 2 \, x z}{2 \, {\left(x^{2} + y^{2}\right)}}, \frac{x^{3} + x y^{2} + x z^{2} + 2 \, y z - x}{2 \, {\left(x^{2} + y^{2}\right)}}\right) \end{array}\)

For $\hat{i}$ and $\hat{j}$ in $D_1$, $h(\hat{i}) = h(\hat{j}) = -\hat{k}$:

In [114]:
all([hD1(I) == minusK2, hD1(J) == minusK2])
Out[114]:
\(\displaystyle \mathrm{True}\)

Next, choose all sets of points $p \in U$, such that $H(p) \neq -\hat{k}$ and $H(p) \in V_2$. This equates to $H(p) \in W_{z \neq -1}$. To provide the restriction, $z(H(p)) \neq -1$, we first take the following sum of the numerator and denominator:

In [115]:
s = ((Hz.numerator() + Hz.denominator())/2).simplify_full()
s
Out[115]:
\(\displaystyle x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} - 1\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} - 2 \, x^{2} + 1\)

Then given the below:

In [116]:
(s-(x^2+y^2+z^2-1)^2).simplify_full()
Out[116]:
\(\displaystyle 4 \, z^{2}\)

We formulate a simpler expression for the constraint, and then apply to the chart $(U,(x,y,z))$:

In [117]:
(x^2+y^2+z^2-1)^2 + 4*z^2 != 0
Out[117]:
\(\displaystyle {\left(x^{2} + y^{2} + z^{2} - 1\right)}^{2} + 4 \, z^{2} \neq 0\)
In [118]:
D2 = U.open_subset('D_2', coord_def=({stereoN: (x^2+y^2!=1, z!=0)}))
stereoN_D2 = stereoN.restrict(D2)

The restriction of $H$ to $D_2$ has $W_{z \neq -1}$ as the codomain, and thus, the image of $H$ on $D_2$ is to be contained in $\mathbb{S}^2$ via $\Pi^S_2$:

In [119]:
hD2 = Proj2S * H.restrict(D2, subcodomain=Wzm1)
hD2.display()
Out[119]:
\(\displaystyle \begin{array}{llcl} & D_2 & \longrightarrow & V_2 \\ & \left(x, y, z\right) & \longmapsto & \left({{x'}_2}, {{y'}_2}\right) = \left(-\frac{2 \, {\left(y^{3} + y z^{2} + {\left(x^{2} - 1\right)} y - 2 \, x z\right)}}{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} - 1\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} - 2 \, x^{2} + 1}, \frac{2 \, {\left(x^{3} + x y^{2} + x z^{2} + 2 \, y z - x\right)}}{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} - 1\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} - 2 \, x^{2} + 1}\right) \end{array}\)

For $\hat{k}$, $-\hat{k}$, and $\hat{1}$ in $D_2$, $h(\hat{k}) = h(-\hat{k}) = h(\hat{1}) = \hat{k}$:

In [120]:
all([hD2(K) == K2, hD2(minusK) == K2, hD2(One) == K2])
Out[120]:
\(\displaystyle \mathrm{True}\)

Since $H^{-1}(\hat{k}) \cap H^{-1}(-\hat{k}) = \emptyset$, we may declare $U = D_1 \cup D_2$:

In [121]:
U.declare_union(D1, D2)

Next, choose all sets of points $p \in V$, such that $H(p) \neq \hat{k}$ and $H(p) \in U_2$. This equates to $H(p) \in W_{z \neq 1}$. On the chart $(V,(x',y',z'))$, the z-coordinate of the given $H(p)$ mapping is as followed:

In [122]:
Hx, Hy, Hz = H.expr(stereoS, stereoN)
Hz
Out[122]:
\(\displaystyle \frac{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} - 3\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} - 6 \, {x'}^{2} + 1}{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} + 1\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} + 2 \, {x'}^{2} + 1}\)

To provide the restriction, $z(H(p)) \neq 1$, we take the difference between the numerator and denominator, simplify, and then apply the constraint to the chart $(V,(x,y,z))$:

In [123]:
Hz.numerator() - Hz.denominator() != 0
Out[123]:
\(\displaystyle -8 \, {x'}^{2} - 8 \, {y'}^{2} \neq 0\)
In [124]:
D3 = V.open_subset('D_3', coord_def=({stereoS: xp^2+yp^2!=0}))
stereoS_D3 = stereoS.restrict(D3)

The restriction of $H$ to $D_3$ has $W_{z \neq 1}$ as the codomain, and thus, the image of $H$ on $D_3$ is to be contained in $\mathbb{S}^2$ via $\Pi^N_2$:

In [125]:
hD3 = Proj2N *  H.restrict(D3, subcodomain=Wz1)
hD3.display()
Out[125]:
\(\displaystyle \begin{array}{llcl} & D_3 & \longrightarrow & U_2 \\ & \left({x'}, {y'}, {z'}\right) & \longmapsto & \left({x_2}, {y_2}\right) = \left(\frac{{y'}^{3} + {y'} {z'}^{2} + {\left({x'}^{2} - 1\right)} {y'} + 2 \, {x'} {z'}}{2 \, {\left({x'}^{2} + {y'}^{2}\right)}}, -\frac{{x'}^{3} + {x'} {y'}^{2} + {x'} {z'}^{2} - 2 \, {y'} {z'} - {x'}}{2 \, {\left({x'}^{2} + {y'}^{2}\right)}}\right) \end{array}\)

For $\hat{i}$ and $\hat{j}$ in $D_3$, $h(\hat{i}) = h(\hat{j}) = -\hat{k}$:

In [126]:
all([hD3(I) == minusK2, hD3(J) == minusK2])
Out[126]:
\(\displaystyle \mathrm{True}\)

Last, choose all sets of points $p \in V$, such that $H(p) \neq -\hat{k}$ and $H(p) \in V_2$. This equates to $H(p) \in W_{z \neq -1}$. To provide the restriction, $z(H(p)) \neq -1$, we first take the following sum of the numerator and denominator:

In [127]:
s = ((Hz.numerator() + Hz.denominator())/2).simplify_full()
s
Out[127]:
\(\displaystyle {x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} - 1\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} - 2 \, {x'}^{2} + 1\)

Then given the below:

In [128]:
(s-(xp^2+yp^2+zp^2-1)^2).simplify_full()
Out[128]:
\(\displaystyle 4 \, {z'}^{2}\)

We formulate a simpler expression for the constraint, and then apply to the chart $(V,(x',y',z'))$:

In [129]:
(xp^2+yp^2+zp^2-1)^2 + 4*zp^2 != 0
Out[129]:
\(\displaystyle {\left({x'}^{2} + {y'}^{2} + {z'}^{2} - 1\right)}^{2} + 4 \, {z'}^{2} \neq 0\)
In [130]:
D4 = V.open_subset('D_4', coord_def=({stereoS: (xp^2+yp^2!=1, zp!=0)}))
stereoS_D4 = stereoS.restrict(D4)

The restriction of $H$ to $D_4$ has $W_{z \neq -1}$ as the codomain, and thus, the image of $H$ on $D_4$ is to be contained in $\mathbb{S}^2$ via $\Pi^S_2$:

In [131]:
hD4 = Proj2S * H.restrict(D4, subcodomain=Wzm1)
hD4.display()
Out[131]:
\(\displaystyle \begin{array}{llcl} & D_4 & \longrightarrow & V_2 \\ & \left({x'}, {y'}, {z'}\right) & \longmapsto & \left({{x'}_2}, {{y'}_2}\right) = \left(\frac{2 \, {\left({y'}^{3} + {y'} {z'}^{2} + {\left({x'}^{2} - 1\right)} {y'} + 2 \, {x'} {z'}\right)}}{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} - 1\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} - 2 \, {x'}^{2} + 1}, -\frac{2 \, {\left({x'}^{3} + {x'} {y'}^{2} + {x'} {z'}^{2} - 2 \, {y'} {z'} - {x'}\right)}}{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} - 1\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} - 2 \, {x'}^{2} + 1}\right) \end{array}\)

For $-\hat{1}$ in $D_4$, $h(-\hat{1}) = \hat{k}$:

In [132]:
hD4(minusOne) == K2
Out[132]:
\(\displaystyle \mathrm{True}\)

And given $H^{-1}(\hat{k}) \cap H^{-1}(-\hat{k}) = \emptyset$, we may declare $V = D_3 \cup D_4$:

In [133]:
V.declare_union(D3, D4)

We now declare the Hopf map, $h: \mathbb{S}^3 \rightarrow \mathbb{S}^2$, with respect to $D_1, D_2, D_3$, and $D_4$ codomains.

In [134]:
h = S3.diff_map(S2, name='h')
h.add_expression(stereoN_D1, stereoN2, hD1.expr(stereoN_D1, stereoN2))
h.add_expression(stereoN_D2, stereoS2, hD2.expr(stereoN_D2, stereoS2))
h.add_expression(stereoS_D3, stereoN2, hD3.expr(stereoS_D3, stereoN2))
h.add_expression(stereoS_D4, stereoS2, hD4.expr(stereoS_D4, stereoS2))
In [135]:
h.display(stereoN_D1, stereoN2)
Out[135]:
\(\displaystyle \begin{array}{llcl} h:& \mathbb{S}^3 & \longrightarrow & \mathbb{S}^2 \\ \text{on}\ D_1 : & \left(x, y, z\right) & \longmapsto & \left({x_2}, {y_2}\right) = \left(-\frac{y^{3} + y z^{2} + {\left(x^{2} - 1\right)} y - 2 \, x z}{2 \, {\left(x^{2} + y^{2}\right)}}, \frac{x^{3} + x y^{2} + x z^{2} + 2 \, y z - x}{2 \, {\left(x^{2} + y^{2}\right)}}\right) \end{array}\)
In [136]:
h.display(stereoN_D2, stereoS2)
Out[136]:
\(\displaystyle \begin{array}{llcl} h:& \mathbb{S}^3 & \longrightarrow & \mathbb{S}^2 \\ \text{on}\ D_2 : & \left(x, y, z\right) & \longmapsto & \left({{x'}_2}, {{y'}_2}\right) = \left(-\frac{2 \, {\left(y^{3} + y z^{2} + {\left(x^{2} - 1\right)} y - 2 \, x z\right)}}{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} - 1\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} - 2 \, x^{2} + 1}, \frac{2 \, {\left(x^{3} + x y^{2} + x z^{2} + 2 \, y z - x\right)}}{x^{4} + y^{4} + z^{4} + 2 \, {\left(x^{2} - 1\right)} y^{2} + 2 \, {\left(x^{2} + y^{2} + 1\right)} z^{2} - 2 \, x^{2} + 1}\right) \end{array}\)
In [137]:
h.display(stereoS_D3, stereoN2)
Out[137]:
\(\displaystyle \begin{array}{llcl} h:& \mathbb{S}^3 & \longrightarrow & \mathbb{S}^2 \\ \text{on}\ D_3 : & \left({x'}, {y'}, {z'}\right) & \longmapsto & \left({x_2}, {y_2}\right) = \left(\frac{{y'}^{3} + {y'} {z'}^{2} + {\left({x'}^{2} - 1\right)} {y'} + 2 \, {x'} {z'}}{2 \, {\left({x'}^{2} + {y'}^{2}\right)}}, -\frac{{x'}^{3} + {x'} {y'}^{2} + {x'} {z'}^{2} - 2 \, {y'} {z'} - {x'}}{2 \, {\left({x'}^{2} + {y'}^{2}\right)}}\right) \end{array}\)
In [138]:
h.display(stereoS_D4, stereoS2)
Out[138]:
\(\displaystyle \begin{array}{llcl} h:& \mathbb{S}^3 & \longrightarrow & \mathbb{S}^2 \\ \text{on}\ D_4 : & \left({x'}, {y'}, {z'}\right) & \longmapsto & \left({{x'}_2}, {{y'}_2}\right) = \left(\frac{2 \, {\left({y'}^{3} + {y'} {z'}^{2} + {\left({x'}^{2} - 1\right)} {y'} + 2 \, {x'} {z'}\right)}}{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} - 1\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} - 2 \, {x'}^{2} + 1}, -\frac{2 \, {\left({x'}^{3} + {x'} {y'}^{2} + {x'} {z'}^{2} - 2 \, {y'} {z'} - {x'}\right)}}{{x'}^{4} + {y'}^{4} + {z'}^{4} + 2 \, {\left({x'}^{2} - 1\right)} {y'}^{2} + 2 \, {\left({x'}^{2} + {y'}^{2} + 1\right)} {z'}^{2} - 2 \, {x'}^{2} + 1}\right) \end{array}\)

Thus, $h(\hat{1}) = h(-\hat{1}) = h(\hat{k}) = h(-\hat{k}) = \hat{k}$ and $h(\hat{i}) = h(-\hat{i}) = h(\hat{j}) = h(-\hat{j}) = -\hat{k}$:

In [139]:
all([h(One)==K2, h(minusOne)==K2, 
     h(K)==K2, h(minusK)==K2,
     h(I)==minusK2, h(minusI)==minusK2,
     h(J)==minusK2, h(minusJ)==minusK2])
Out[139]:
\(\displaystyle \mathrm{True}\)

The Hopf map in spherical coordinates is as followed:

In [140]:
D1A = A.intersection(D1)
spherD1A = spher.restrict(D1A)
spherD1A
Out[140]:
\(\displaystyle \left(A\cap D_1,({\chi}, {\theta}, {\phi})\right)\)
In [141]:
stereoND1A = stereoN_D1.restrict(D1A)
stereoND1A.add_restrictions((y!=0, x<0))
In [142]:
D1A.atlas()
Out[142]:
\(\displaystyle \left[\left(A\cap D_1,({\chi}, {\theta}, {\phi})\right), \left(A\cap D_1,(x, y, z)\right)\right]\)
In [143]:
spher_to_stereoND1A = spher_to_stereoN.restrict(D1A)
stereoN_to_spherD1A = spher_to_stereoN.inverse().restrict(D1A)
spher_to_stereoSD1A = spher_to_stereoS.restrict(D1A)
stereoS_to_spherD1A = stereoS_to_spher.restrict(D1A)
In [144]:
h.expr(stereoND1A, stereoN2)  # necessary
h.display(spherD1A, stereoN2)
Out[144]:
\(\displaystyle \begin{array}{llcl} h:& \mathbb{S}^3 & \longrightarrow & \mathbb{S}^2 \\ \text{on}\ A\cap D_1 : & \left({\chi}, {\theta}, {\phi}\right) & \longmapsto & \left({x_2}, {y_2}\right) = \left(\frac{\cos\left({\phi}\right) \cos\left({\theta}\right) \sin\left({\chi}\right) + \cos\left({\chi}\right) \sin\left({\phi}\right)}{\sin\left({\chi}\right) \sin\left({\theta}\right)}, \frac{{\left(\cos\left({\chi}\right) + 1\right)} \cos\left({\theta}\right) \sin\left({\chi}\right) \sin\left({\phi}\right) + {\left(\sin\left({\chi}\right)^{2} - \cos\left({\chi}\right) - 1\right)} \cos\left({\phi}\right)}{{\left(\cos\left({\chi}\right) + 1\right)} \sin\left({\chi}\right) \sin\left({\theta}\right)}\right) \end{array}\)
In [145]:
hA = h.restrict(D1A, subcodomain=A2)
hA.display(spherD1A, spher2)
Out[145]:
\(\displaystyle \begin{array}{llcl} h:& A\cap D_1 & \longrightarrow & A_2 \\ & \left({\chi}, {\theta}, {\phi}\right) & \longmapsto & \left({\theta_2}, {\phi_2}\right) = \left(2 \, \arctan\left(\frac{\sin\left({\chi}\right) \sin\left({\theta}\right)}{\sqrt{\sin\left({\chi}\right) \sin\left({\theta}\right) + 1} \sqrt{-\sin\left({\chi}\right) \sin\left({\theta}\right) + 1}}\right), \pi - \arctan\left(\frac{\cos\left({\theta}\right) \sin\left({\chi}\right) \sin\left({\phi}\right) - \cos\left({\chi}\right) \cos\left({\phi}\right)}{\sin\left({\chi}\right) \sin\left({\theta}\right)}, -\frac{\cos\left({\phi}\right) \cos\left({\theta}\right) \sin\left({\chi}\right) + \cos\left({\chi}\right) \sin\left({\phi}\right)}{\sin\left({\chi}\right) \sin\left({\theta}\right)}\right)\right) \end{array}\)

Section 6. Hopf Coordinates¶

We'll now translate the coordinates in $\mathbb{S}^3$ and $\mathbb{R}^4$ to a new coordinate system that simplifies the Hopf map from $\mathbb{S}^3$ to $\mathbb{S}^2$. This coordinate system is prescribed as the Hopf coordinate, $(\eta, \alpha, \beta)$, where via embedding, $\Phi$, to $\mathbb{R}^4$ (as shown here on 3-sphere Hopf coordinate Wikipedia page),

\begin{equation*} \begin{split} T = cos(\eta) sin(\alpha) \\ X = sin(\eta) cos(\alpha + \beta) \\ Y = sin(\eta) sin(\alpha + \beta) \\ Z = cos(\eta) cos(\alpha) \\ \end{split} \end{equation*}

Above, $\eta \in (0, \frac{\pi}{2})$, $\alpha \in (0, \frac{\pi}{2})$, and $\beta \in (0, 2\pi)$. This translation is restricted to space $D_1$, minus points that satisfy $X^2 + Y^2 + Z^2 = 1$ (at $\alpha=0$ or $2\pi$) and $TX-YZ=0$ (at $\beta=0$ or $2\pi$). And, in terms of stereographic coordinates, this translates to

\begin{equation*} \begin{split} x^2 + y^2 + z^2 = 1 \\ x(1 - x^2 - y^2 - z^2) - 2yz = 0 \\ \end{split} \end{equation*}

Hence, the open domain of the prescribed Hopf coordinate is defined, given the above restrictions:

In [146]:
B = D1.open_subset('B', coord_def={stereoN_D1: 
                                   [x^2+y^2+z^2!=1, 
                                    x*(1-x^2-y^2-z^2)-2*y*z!=0]})
print(B)
Open subset B of the 3-dimensional differentiable manifold S^3

Before proceeding, lets define the Hopf coordinate chart and coordinates, with their respective ranges:

In [147]:
Hcoord.<eta,alp,bet> = B.chart(r"eta:(0,pi/2):\eta alpha:(0,2*pi):\alpha beta:(0,2*pi):\beta")
Hcoord
Out[147]:
\(\displaystyle \left(B,({\eta}, {\alpha}, {\beta})\right)\)

Next, provide the transition map between the stereographic coordinates (restricted to open subset $\verb|B|$ above) and Hopf coordinate:

In [148]:
Hcoord_to_stereoN = Hcoord.transition_map(
                        stereoN.restrict(B),
                        (sin(eta)*cos(alp+bet)/(1+cos(eta)*sin(alp)),
                         sin(eta)*sin(alp+bet)/(1+cos(eta)*sin(alp)),
                         cos(eta)*cos(alp)/(1+cos(eta)*sin(alp))))
Hcoord_to_stereoN.display()
Out[148]:
\(\displaystyle \left\{\begin{array}{lcl} x & = & \frac{\cos\left({\alpha} + {\beta}\right) \sin\left({\eta}\right)}{\cos\left({\eta}\right) \sin\left({\alpha}\right) + 1} \\ y & = & \frac{\sin\left({\alpha} + {\beta}\right) \sin\left({\eta}\right)}{\cos\left({\eta}\right) \sin\left({\alpha}\right) + 1} \\ z & = & \frac{\cos\left({\alpha}\right) \cos\left({\eta}\right)}{\cos\left({\eta}\right) \sin\left({\alpha}\right) + 1} \end{array}\right.\)
In [149]:
Hcoord_to_stereoN.set_inverse(asin(2*sqrt(x^2+y^2)/(1+x^2+y^2+z^2)),
                              atan2(x^2+y^2+z^2-1, -2*z) + pi,
                              atan2(-y,-x) - atan2(x^2+y^2+z^2-1, -2*z))
Check of the inverse coordinate transformation:
  eta == arcsin((cos(eta)*sin(alpha) + 1)*sqrt(cos(eta) + 1)*sqrt(-cos(eta) + 1)/abs(cos(eta)*sin(alpha) + 1))  **failed**
  alpha == pi - arctan2(2*cos(eta)*sin(alpha)/(cos(eta)*sin(alpha) + 1), -2*cos(alpha)*cos(eta)/(cos(eta)*sin(alpha) + 1))  **failed**
  beta == arctan2(2*cos(eta)*sin(alpha)/(cos(eta)*sin(alpha) + 1), -2*cos(alpha)*cos(eta)/(cos(eta)*sin(alpha) + 1)) - arctan2((cos(beta)*sin(alpha) + cos(alpha)*sin(beta))*sin(eta)/(cos(eta)*sin(alpha) + 1), -(cos(alpha)*cos(beta) - sin(alpha)*sin(beta))*sin(eta)/(cos(eta)*sin(alpha) + 1))  **failed**
  x == x  *passed*
  y == y  *passed*
  z == z  *passed*
NB: a failed report can reflect a mere lack of simplification.

Above failures are due to a lack of trigionometric simplifications for the above expressions

A beautified display of the inverse transition map can be shown via $\verb|display()|$:

In [150]:
Hcoord_to_stereoN.inverse().display()
Out[150]:
\(\displaystyle \left\{\begin{array}{lcl} {\eta} & = & \arcsin\left(\frac{2 \, \sqrt{x^{2} + y^{2}}}{x^{2} + y^{2} + z^{2} + 1}\right) \\ {\alpha} & = & \pi + \arctan\left(x^{2} + y^{2} + z^{2} - 1, -2 \, z\right) \\ {\beta} & = & -\arctan\left(x^{2} + y^{2} + z^{2} - 1, -2 \, z\right) + \arctan\left(-y, -x\right) \end{array}\right.\)

Next, lets define the embedding with respect to Hopf coordinate via the chart on $\verb|B|$:

In [151]:
PhiB = Phi.restrict(B)
PhiB.display()
Out[151]:
\(\displaystyle \begin{array}{llcl} \Phi:& B & \longrightarrow & \mathbb{R}^4 \\ & \left(x, y, z\right) & \longmapsto & \left(T, X, Y, Z\right) = \left(-\frac{x^{2} + y^{2} + z^{2} - 1}{x^{2} + y^{2} + z^{2} + 1}, \frac{2 \, x}{x^{2} + y^{2} + z^{2} + 1}, \frac{2 \, y}{x^{2} + y^{2} + z^{2} + 1}, \frac{2 \, z}{x^{2} + y^{2} + z^{2} + 1}\right) \\ & \left({\eta}, {\alpha}, {\beta}\right) & \longmapsto & \left(T, X, Y, Z\right) = \left(\cos\left({\eta}\right) \sin\left({\alpha}\right), {\left(\cos\left({\alpha}\right) \cos\left({\beta}\right) - \sin\left({\alpha}\right) \sin\left({\beta}\right)\right)} \sin\left({\eta}\right), {\left(\cos\left({\beta}\right) \sin\left({\alpha}\right) + \cos\left({\alpha}\right) \sin\left({\beta}\right)\right)} \sin\left({\eta}\right), \cos\left({\alpha}\right) \cos\left({\eta}\right)\right) \end{array}\)

We recover the expression at the beginning of this section for $(T, X, Y, Z)$ in terms of Hopf coordinates if we further reduce the $X$ and $Y$ term via $\verb|trig_reduce()|$:

For $X$:

In [152]:
PhiB.expression(Hcoord, X4)[1].factor().trig_reduce()
Out[152]:
\(\displaystyle \cos\left({\alpha} + {\beta}\right) \sin\left({\eta}\right)\)

For $Y$:

In [153]:
PhiB.expression(Hcoord, X4)[2].factor().trig_reduce()
Out[153]:
\(\displaystyle \sin\left({\alpha} + {\beta}\right) \sin\left({\eta}\right)\)

Now, the Hopf map to $U_2 \in \mathbb{S}^2$ in terms of the stereographic coordinates restricted to space $\verb|B|$ is as shown below:

In [154]:
h.display(stereoN.restrict(B), stereoN2)
Out[154]:
\(\displaystyle \begin{array}{llcl} h:& \mathbb{S}^3 & \longrightarrow & \mathbb{S}^2 \\ \text{on}\ B : & \left(x, y, z\right) & \longmapsto & \left({x_2}, {y_2}\right) = \left(-\frac{y^{3} + y z^{2} + {\left(x^{2} - 1\right)} y - 2 \, x z}{2 \, {\left(x^{2} + y^{2}\right)}}, \frac{x^{3} + x y^{2} + x z^{2} + 2 \, y z - x}{2 \, {\left(x^{2} + y^{2}\right)}}\right) \end{array}\)

Furthermore, the Hopf map of the Hopf coordinates to $U_2 \in \mathbb{S}^2$ is:

In [155]:
h.display(Hcoord, stereoN2)
Out[155]:
\(\displaystyle \begin{array}{llcl} h:& \mathbb{S}^3 & \longrightarrow & \mathbb{S}^2 \\ \text{on}\ B : & \left({\eta}, {\alpha}, {\beta}\right) & \longmapsto & \left({x_2}, {y_2}\right) = \left(\frac{\cos\left({\beta}\right) \cos\left({\eta}\right)}{\sin\left({\eta}\right)}, \frac{\cos\left({\eta}\right) \sin\left({\beta}\right)}{\sin\left({\eta}\right)}\right) \end{array}\)

In the above mapping, note that the mapping is independent of $\alpha$. Furthermore, the spherical coordinates of the mapped Hopf coordinates is as shown:

In [156]:
hB = h.restrict(B, subcodomain=A2)
hB.display(Hcoord, spher2)
Out[156]:
\(\displaystyle \begin{array}{llcl} h:& B & \longrightarrow & A_2 \\ & \left({\eta}, {\alpha}, {\beta}\right) & \longmapsto & \left({\theta_2}, {\phi_2}\right) = \left(2 \, \arctan\left(\frac{\sin\left({\eta}\right)}{\cos\left({\eta}\right)}\right), \pi - \arctan\left(\frac{\cos\left({\eta}\right) \sin\left({\beta}\right)}{\sin\left({\eta}\right)}, -\frac{\cos\left({\beta}\right) \cos\left({\eta}\right)}{\sin\left({\eta}\right)}\right)\right) \end{array}\)

Through further simplification, the above is simplified to:

\begin{equation*} \begin{split} arctan\left(\frac{sin(\eta)}{cos(\eta)}\right) = \eta \\ arctan\left(\frac{cos(\eta)sin(\beta)}{sin(\eta)},-\frac{cos(\beta)cos(\eta)}{sin(\eta)}\right) = arctan2(sin(\beta),-cos(\beta)) = \pi - \beta \end{split} \end{equation*}

Hence, given the deduced simplification, $(\theta_2,\phi_2) = (2\eta,\beta)$, which we prescribe to Hopf map, $\verb|hB|$:

In [157]:
hB.add_expression(Hcoord, spher2, (2*eta, bet))
hB.display(Hcoord, spher2)
Out[157]:
\(\displaystyle \begin{array}{llcl} h:& B & \longrightarrow & A_2 \\ & \left({\eta}, {\alpha}, {\beta}\right) & \longmapsto & \left({\theta_2}, {\phi_2}\right) = \left(2 \, {\eta}, {\beta}\right) \end{array}\)

The above simplification is the Hopf map, with respect to Hopf coordinates 😎


Section 7. The Hopf Fibration¶

According to the above derivation of Hopf map, $h$, the Hopf map is surjective. This means that for each point $p \in \mathbb{S}^2$, $h^{-1}(p)$ is mapped to from some preimage set at a fixed $(\eta,\beta)$, where $\alpha$ varies between $(0, 2\pi)$. The projection of $h^{-1}(p)$ to the $(T,Z)-$plane corresponds to an $S^1$ circle of radius $cos(\eta)$. The projection of $h^{-1}(p)$ to the $(X,Y)-$plane corresponds to a circle of $sin(\eta)$ radius. These projections constitute a great circle of $\mathbb{S}^3$. Thus, by further derivation, $\mathbb{S^3}$ is a fiber bundle composition over $\mathbb{S}^2$ with $\mathbb{S}^1$ fibers, where $h: \mathbb{S}^3 \rightarrow \mathbb{S}^2$ is the bundle projection.

Lets get a few plots of the fibers of the fiber bundle via plotting the Hopf coordinates in terms of the stereographic coordinates. First, we'll take a look at the set of circle fibers at $\eta = \frac{\pi}{4}$. The fibers associated with $h^{-1}(p)$ are the circles where $\alpha$ varies between $(0, 2\pi)$ and $\beta$ is fixed. These fibers, $h^{-1}(p)$, are the green circles below, and they are all linked 🌐

In [158]:
graph = Hcoord.plot(stereoN, 
                    fixed_coords={eta: pi/4},
                    color={alp: 'green', bet: 'orange'},
                    number_values=9, label_axes=False)
show(graph, axes_labels=['x','y','z'])

On the other hand, a projection to $(X,Y,T)$ of $\mathbb{R}^4$ via embedding $\Phi$ of Hopf coordinates is as shown below:

In [159]:
graph = Hcoord.plot(X4, mapping=PhiB, ambient_coords=(X,Y,T), 
                    fixed_coords={eta: pi/4},
                    color={alp: 'green', bet: 'orange'},
                    number_values=9, label_axes=False)
show(graph, axes_labels=['X','Y','T'])

Now, suppose we fix $\beta$ to $\frac{\pi}{2}$, instead of $\eta$. When plotting the Hopf coordinates in terms of the stereographic coordinates, we end up with sets of circle fibers, where $h^{-1}(p)$ is associated with the green circles where $\alpha$ varies:

In [160]:
graph = Hcoord.plot(stereoN, 
                    fixed_coords={bet: pi/2}, 
                    ranges={eta: (0.25, 1.5)},
                    color={eta: 'red', alp: 'green'},
                    number_values=9, plot_points=150, 
                    label_axes=False)
show(graph, axes_labels=['x','y','z'])

Now, we'll let each Hopf coordinate vary and project to $(X,Y,Z)$ of $\mathbb{R}^4$. We get a Hopf coordinate grid:

In [161]:
graph = Hcoord.plot(X4, mapping=PhiB, ambient_coords=(X,Y,Z), 
                    color={eta: 'red', alp: 'green', bet: 'orange'},
                    number_values=7, label_axes=False)
show(graph, axes_labels=['X','Y','Z'])

As observed above, the fibers $h^{-1}(p)$ of each point $p \in \mathbb{S}^2$ is a curve in $\mathbb{S}^3$. Lets define these fibers, where $\alpha$ varies on a real line between $(0, 2\pi)$, and $(\eta, \beta)$ are constant:

In [162]:
R.<t> = RealLine()
def fiber(eta, bet):
    return S3.curve({Hcoord: (eta, t, bet)}, (t, 0, 2*pi))

For example, let $(\eta, \beta)=(\frac{\pi}{6}, \frac{\pi}{4})$:

In [163]:
F = fiber(pi/6, pi/4)
print(F)
Curve in the 3-dimensional differentiable manifold S^3
In [164]:
F.display()
Out[164]:
\(\displaystyle \begin{array}{llcl} & \left(0, 2 \, \pi\right) & \longrightarrow & \mathbb{S}^3 \\ & t & \longmapsto & \left(x, y, z\right) = \left(\frac{\sqrt{2} \cos\left(t\right) - \sqrt{2} \sin\left(t\right)}{2 \, {\left(\sqrt{3} \sin\left(t\right) + 2\right)}}, \frac{\sqrt{2} \cos\left(t\right) + \sqrt{2} \sin\left(t\right)}{2 \, {\left(\sqrt{3} \sin\left(t\right) + 2\right)}}, \frac{\sqrt{3} \cos\left(t\right)}{\sqrt{3} \sin\left(t\right) + 2}\right) \\ & t & \longmapsto & \left({\eta}, {\alpha}, {\beta}\right) = \left(\frac{1}{6} \, \pi, t, \frac{1}{4} \, \pi\right) \end{array}\)

It produces the circle fiber shown below:

In [165]:
graph_F = F.plot(chart=stereoN, color='green', plot_points=100)
graph_F
Out[165]:

Now, lets plot for $\eta=\frac{\pi}{6}$, $\eta=\frac{\pi}{4}$, and $\eta=\frac{5\pi}{12}$, where the color of the circle fibers associated with each $\eta$ value are turquoise, gold, and red, respectively. Note that the fibers are elements of a torus, where the surface area of the torus gets larger as the value of $\eta$ gets smaller:

In [166]:
graph= Graphics()
etas = {pi/6: ['turquoise', (0, 2*pi), 30], 
        pi/4: ['gold', (0,2*pi), 30],
        5*pi/12: ['red', (0, 2*pi), 30]}
for eta_v, param in etas.items():
    color = param[0]
    beta_min, beta_max = param[1]
    nb = param[2]
    db = (beta_max - beta_min)/(nb-1)
    betas = [beta_min + db*k for k in range(nb)]
    for beta_v in betas:
        F = fiber(eta_v, beta_v)
        F.coord_expr(stereoN.restrict(B))
        graph += F.plot(chart=stereoN, color=color, plot_points=150,
                        label_axes=None)
graph
Out[166]:

Here's the image of the fibers projected to the $(x,y)$-plane:

In [167]:
graph= Graphics()
etas = {pi/6: ['turquoise', (0, 2*pi), 12], 
        pi/4: ['gold', (0,2*pi), 12],
        5*pi/12: ['red', (0, 2*pi), 12]}
for eta_v, param in etas.items():
    color = param[0]
    beta_min, beta_max = param[1]
    nb = param[2]
    db = (beta_max - beta_min)/(nb-1)
    betas = [beta_min + db*k for k in range(nb)]
    for beta_v in betas:
        F = fiber(eta_v, beta_v)
        F.coord_expr(stereoN.restrict(B))
        graph += F.plot(chart=stereoN, ambient_coords=(x,y), 
                        color=color, plot_points=150)
show(graph, aspect_ratio=1)

Here's the image of the fibers embedded into $\mathbb{R}^4$ and projected to $(T,X,Z)$-plane:

In [168]:
graph = Graphics()
for eta_v, param in etas.items():
    color = param[0]
    beta_min, beta_max = param[1]
    nb = param[2]
    db = (beta_max - beta_min)/(nb-1)
    betas = [beta_min + db*k for k in range(nb)]
    for beta_v in betas:
        F = fiber(eta_v, beta_v)
        F.coord_expr(stereoN.restrict(B))
        graph += F.plot(chart=X4, ambient_coords=(X,Z,T), 
                        mapping=Phi, color=color, 
                        plot_points=200, label_axes=None)
show(graph, axes_labels=['X', 'Z', 'T'])

Here's the view in $(X,Y,Z)$-plane:

In [169]:
graph = Graphics()
for eta_v, param in etas.items():
    color = param[0]
    beta_min, beta_max = param[1]
    nb = param[2]
    db = (beta_max - beta_min)/(nb-1)
    betas = [beta_min + db*k for k in range(nb)]
    for beta_v in betas:
        F = fiber(eta_v, beta_v)
        F.coord_expr(stereoN.restrict(B))
        graph += F.plot(chart=X4, ambient_coords=(X,Y,Z), 
                        mapping=Phi, color=color, 
                        plot_points=100, label_axes=None)
show(graph, axes_labels=['X', 'Y', 'Z'])

Hence, we've shown the image of Hopf fibration in different charts and viewpoints of $\mathbb{S}^3$. Given our full construction of Hopf fibration from $\mathbb{S}^3$ to $\mathbb{S}^2$, we may continue to plot in other viewpoints. In constructing the Hopf fibration, we created 18 charts for $\mathbb{S}^3$ and 7 charts for $\mathbb{S}^2$!

In [170]:
S3.atlas()
Out[170]:
\(\displaystyle \left[\left(U,(x, y, z)\right), \left(V,({x'}, {y'}, {z'})\right), \left(W,(x, y, z)\right), \left(W,({x'}, {y'}, {z'})\right), \left(A,(x, y, z)\right), \left(A,({x'}, {y'}, {z'})\right), \left(A,({\chi}, {\theta}, {\phi})\right), \left(W_{z\not=1},(x, y, z)\right), \left(W_{z\not=-1},(x, y, z)\right), \left(D_1,(x, y, z)\right), \left(D_2,(x, y, z)\right), \left(D_3,({x'}, {y'}, {z'})\right), \left(D_4,({x'}, {y'}, {z'})\right), \left(A\cap D_1,({\chi}, {\theta}, {\phi})\right), \left(A\cap D_1,(x, y, z)\right), \left(A\cap D_1,({x'}, {y'}, {z'})\right), \left(B,(x, y, z)\right), \left(B,({\eta}, {\alpha}, {\beta})\right)\right]\)
In [171]:
len(S3.atlas())
Out[171]:
\(\displaystyle 18\)
In [172]:
S2.atlas()
Out[172]:
\(\displaystyle \left[\left(U_2,({x_2}, {y_2})\right), \left(V_2,({{x'}_2}, {{y'}_2})\right), \left(W_2,({x_2}, {y_2})\right), \left(W_2,({{x'}_2}, {{y'}_2})\right), \left(A_2,({x_2}, {y_2})\right), \left(A_2,({{x'}_2}, {{y'}_2})\right), \left(A_2,({\theta_2}, {\phi_2})\right)\right]\)
In [173]:
len(S2.atlas())
Out[173]:
\(\displaystyle 7\)

Each chart of $\mathbb{S}^3$ was derived from prescribed stereographic coordinates, hyperspherical coordinates, and Hopf's coordinates:

In [174]:
S3.top_charts()
Out[174]:
\(\displaystyle \left[\left(U,(x, y, z)\right), \left(V,({x'}, {y'}, {z'})\right), \left(A,({\chi}, {\theta}, {\phi})\right), \left(B,({\eta}, {\alpha}, {\beta})\right)\right]\)

Each chart of $\mathbb{S}^2$ was derived from prescribed stereographic coordinates and spherical coordinates:

In [175]:
S2.top_charts()
Out[175]:
\(\displaystyle \left[\left(U_2,({x_2}, {y_2})\right), \left(V_2,({{x'}_2}, {{y'}_2})\right), \left(A_2,({\theta_2}, {\phi_2})\right)\right]\)

Appendix¶

SageManifolds: Software Architecture¶

From a computer architectural perspective, SageManifolds can be described as follows:

  1. Language and Environment: SageManifolds is developed using the Python programming language and is designed to work within the SageMath environment. SageMath provides a powerful computational environment for mathematical calculations and integrates several libraries, including SymPy for symbolic mathematics.

  2. Object-Oriented Design: SageManifolds adopts an object-oriented design approach, representing mathematical entities such as manifolds, charts, differential forms, and maps as objects with associated methods and properties. This design allows for modular and extensible code organization, enabling easy manipulation and computation on these objects, alongside encapsulation of data and functionality, and the ability to define relationships and hierarchies among objects.

  3. Manifold Representation: Manifolds in SageManifolds are represented using data structures that capture their essential properties. A manifold object contains information such as the manifold's dimension, name, coordinate charts, and associated differential structures. These structures are typically implemented as classes and utilize data structures like lists, dictionaries, and arrays.

  4. Chart Representation: Coordinate charts on manifolds are represented as objects, storing information about the chart's domain, range, coordinate systems, and transition maps. SageManifolds provides classes to handle different types of coordinate systems, such as Cartesian coordinates, polar coordinates, or other user-defined coordinate systems.

  5. Differential Forms and Maps: SageManifolds provides classes to represent differential forms and maps between manifolds. Differential forms are represented as linear combinations of basis forms, with operations defined for addition, multiplication, and differentiation. Maps between manifolds are represented using DiffMap objects, storing the expressions defining the map and providing methods for composition, pushforward, and pullback.

  6. Symbolic and Numerical Computation: SageManifolds leverages the capabilities of the underlying SageMath environment for both symbolic and numerical computation. It utilizes SymPy for symbolic mathematics, allowing users to work with expressions, perform algebraic manipulations, and compute derivatives symbolically. Numerical computations can be performed using numerical libraries integrated into SageMath, such as NumPy and SciPy.

  7. Integration with SageMath: SageManifolds is seamlessly integrated into the SageMath environment, which provides a wide range of mathematical functionality. Users can access SageMath's extensive library of mathematical functions, algorithms, and tools to complement their work with SageManifolds. This integration allows for a comprehensive mathematical environment that supports various mathematical disciplines.

  8. Extensibility: SageManifold is designed to be extensible, allowing users to define their own mathematical objects, functions, and algorithms. It provides a framework for creating new classes, extending existing functionality, and contributing new features to the software.

  9. Computational Efficiency: SageManifold incorporates currently known efficient algorithms and data structures to ensure computational efficiency. It optimizes operations and algorithms, utilizes parallel processing when possible, and integrates specialized libraries for specific mathematical computations.

  10. Cross-Platform Compatibility: SageManifold is designed to be cross-platform, supporting major operating systems such as Windows, macOS, and Linux. This compatibility allows users to access SageManifold's functionalities on their preferred operating systems without limitations.

Overall, SageManifolds combines the power of symbolic mathematics, object-oriented design, and computational libraries to provide a robust and flexible framework for working with smooth manifolds and differential forms. Its architectural design enables efficient representation, manipulation, and computation of mathematical objects, making it a valuable tool for researchers and practitioners in the field of differential geometry and related disciplines.